actions(update-tools): avoid notifying our outdated deps everywhere

In the current main branch, workflow update-tools includes the content
of the upstream release notes in the created GitHub Issue.  This
triggers a notification to every upstream contributor mentioned in the
release note.  This also creates a cross-reference link to our GitHub
Issue (reporting that our dependency is not up-to-date) in every
upstream issue and pull request.  The information that we need to
update our dependency is not relavant to the upstream contributors,
issues, and pull requests at all.  We should avoid this situation.

In the first place, we do not need to include a copy of the upstream
release note.  We can just put a link to the upstream release note.
Currently, we anyway hide the content in the <details> tag and require
the reader to press the button.  The user experience is not so
different from pressing a link and visiting the upstream release note.
This commit is contained in:
Koichi Murase
2025-01-16 21:17:37 +09:00
committed by Igor
parent f21e700dc6
commit 1fdd801908

View File

@@ -81,13 +81,6 @@ jobs:
version_latest=$(curl --silent "https://api.github.com/repos/${{ matrix.tool.PROJECT_NAME }}/releases/latest" | jq -r .tag_name)
version_latest=${version_latest#v} # Removing the 'v' prefix since the script uses only plain numbers
echo "version_latest=$version_latest" >> $GITHUB_OUTPUT
{
echo "CHANGE_LOG<<EOFFEOFFF42" # Has to be a unique delimiter that doesn't appear in the changelog itself
curl --silent "https://api.github.com/repos/${{ matrix.tool.PROJECT_NAME }}/releases/latest" | jq -r .body \
| sed -E -e 's/(#([0-9]+))/${{ matrix.tool.USER_NAME }}\/${{ matrix.tool.REPO_NAME }}\1/g' \
-e 's/https\:\/\/github\.com/https\:\/\/redirect.github.com/g'
echo "EOFFEOFFF42"
} >> "$GITHUB_ENV"
- name: Update ${{ matrix.tool.VERSION_VAR}} in script
# @TODO Make sure that the version is actually higher, not lower (the 'latest' tag does not neccessarily mean that the version is higher!)
@@ -106,13 +99,6 @@ jobs:
body: |
Bump [${{ matrix.tool.PROJECT_NAME}}](https://github.com/${{ matrix.tool.PROJECT_NAME }}) from ${{ steps.get-version-current.outputs.version_current }} to ${{ steps.get-version-latest.outputs.version_latest }} by bumping `${{ matrix.tool.VERSION_VAR}}` in `${{ matrix.tool.VAR_FILE}}`.
<details><summary><b>Release notes</b></summary>
<p><em>Sourced from <a href="https://github.com/${{ matrix.tool.PROJECT_NAME }}/releases">${{ matrix.tool.PROJECT_NAME }}'s releases</a>.
<br>Please note that this only shows the release notes for the latest release.</em></p>
<blockquote>
${{ env.CHANGE_LOG }}
</blockquote>
</details>
Check <a href="https://github.com/${{ matrix.tool.PROJECT_NAME }}/releases/latest">the upstream release notes</a>.
<p><em>Please note that the above link only shows the release notes for the latest release.</em></p>
labels: Dependencies, Bash