diff --git a/.github/scripts/generate-release-contributors.sh b/.github/scripts/generate-release-contributors.sh index 5265d6b..7c543f7 100755 --- a/.github/scripts/generate-release-contributors.sh +++ b/.github/scripts/generate-release-contributors.sh @@ -1,8 +1,5 @@ #!/bin/bash -e -# shellcheck disable=SC2016 -# shellcheck disable=SC2086 - # this should be run on the release branch # NOTE if you need to run this script locally, you will need to first: @@ -55,6 +52,8 @@ query($q: String!, $endCursor: String) { # this query captures authors of issues which have had PRs in the current range reference the issue # but not necessarily through closingIssuesReferences (e.g. addressing just a part of an issue) +# +# note: [^0-9<&#;] below excludes HTML entity markers to avoid matching Ӓ as issue #1234 contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query=' query($q: String!, $endCursor: String) { search(query: $q, type: ISSUE, first: 100, after: $endCursor) { @@ -72,8 +71,8 @@ query($q: String!, $endCursor: String) { } } ' --jq '.data.search.edges.[].node.body' \ - | grep -oE "#[0-9]{4,}$|#[0-9]{4,}[^0-9<]|$GITHUB_REPOSITORY/issues/[0-9]{4,}" \ - | grep -oE "[0-9]{4,}" \ + | grep -oE "#[0-9]{3,}$|#[0-9]{3,}[^0-9<&#;]|$GITHUB_REPOSITORY/issues/[0-9]{3,}" \ + | grep -oE "[0-9]{3,}" \ | xargs -I{} gh issue view {} --json 'author,url' --jq '[.author.login,.url]' \ | grep -v '/pull/' \ | sed 's/^\["//' \