Skip to content

Commit 1e65a95

Browse files
authored
fix: prevent GitHub at mentions in quoted release notes (#684)
Replace instances of @... to [at]... to prevent GitHub from mentioning users that contributed fixes of automated extension updates Closes #679
1 parent 32879be commit 1e65a95

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/actions/update-vscode-extensions/update-vscode-extensions.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ prevent_github_backlinks() {
1414
sed 's|https://github.com|https://www.github.com|g'
1515
}
1616

17+
prevent_github_at_mentions() {
18+
sed 's| @| [at]|g'
19+
}
20+
1721
get_github_releasenotes() {
1822
local GITHUB_URL=${1:?}
1923
local CURRENT_RELEASE=${2:?}
@@ -43,7 +47,7 @@ for EXTENSION in $(echo $JSON | jq -r '.customizations.vscode.extensions | flatt
4347
then
4448
GITHUB_URL=$(echo $LATEST_NON_PRERELEASE_VERSION_JSON | jq -r '.properties | map(select(.key == "Microsoft.VisualStudio.Services.Links.GitHub"))[] | .value')
4549

46-
RELEASE_DETAILS=$(get_github_releasenotes $GITHUB_URL $CURRENT_VERSION | prevent_github_backlinks)
50+
RELEASE_DETAILS=$(get_github_releasenotes $GITHUB_URL $CURRENT_VERSION | prevent_github_backlinks | prevent_github_at_mentions)
4751
UPDATE_DETAILS_MARKDOWN=$(printf "Updates \`%s\` from %s to %s\n<details>\n<summary>Release notes</summary>\n<blockquote>\n\n%s\n</blockquote>\n</details>\n\n%s" $NAME $CURRENT_VERSION $LATEST_NON_PRERELEASE_VERSION "$RELEASE_DETAILS" "$UPDATE_DETAILS_MARKDOWN")
4852
UPDATED_EXTENSIONS_JSON=$(echo $UPDATED_EXTENSIONS_JSON | jq -c '. += ["'$NAME'"]')
4953
fi

0 commit comments

Comments
 (0)