Skip to content

Build your personal knowledge base with Trilium Notes

ci(pdfjs): stop the bump PR from pinging upstream contributors

Claudef7ea0452cd12
diff --git a/.github/workflows/update-pdfjs-viewer.yml b/.github/workflows/update-pdfjs-viewer.yml
index 463ea3fe5b..bff0f4f79c 100644
--- a/.github/workflows/update-pdfjs-viewer.yml
+++ b/.github/workflows/update-pdfjs-viewer.yml
@@ -133,6 +133,13 @@ jobs:
# link, which is always exact.
printf '[Upstream comparison](https://github.com/mozilla/pdf.js/compare/v%s...v%s)\n\n' "$FROM" "$TO" >> "$body"
notes=$(gh api "/repos/mozilla/pdf.js/releases/tags/v$TO" --jq .body 2>/dev/null || true)
+ # A zero-width space after `@` stops GitHub from notifying the upstream authors,
+ # and `redirect.github.com` stops it from adding a cross-reference to each
+ # upstream pull request.
+ zwsp=$'​'
+ notes=$(printf '%s' "$notes" | sed -E \
+ -e "s/(^|[^[:alnum:]_.\`/-])@([[:alnum:]])/\1@${zwsp}\2/g" \
+ -e 's#https://github\.com/#https://redirect.github.com/#g')
if [ -n "$notes" ]; then
if [ "${#notes}" -gt 30000 ]; then
notes=$(printf '%s' "$notes" | head -c 30000)