Skip to content

Commit 73d0833

Browse files
authored
Align generate-release-contributors.sh with contrib repo (open-telemetry#8057)
1 parent 52bb9fa commit 73d0833

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/scripts/generate-release-contributors.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash -e
22

3-
# shellcheck disable=SC2016
4-
# shellcheck disable=SC2086
5-
63
# this should be run on the release branch
74

85
# NOTE if you need to run this script locally, you will need to first:
@@ -55,6 +52,8 @@ query($q: String!, $endCursor: String) {
5552

5653
# this query captures authors of issues which have had PRs in the current range reference the issue
5754
# but not necessarily through closingIssuesReferences (e.g. addressing just a part of an issue)
55+
#
56+
# note: [^0-9<&#;] below excludes HTML entity markers to avoid matching &#1234; as issue #1234
5857
contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query='
5958
query($q: String!, $endCursor: String) {
6059
search(query: $q, type: ISSUE, first: 100, after: $endCursor) {
@@ -72,8 +71,8 @@ query($q: String!, $endCursor: String) {
7271
}
7372
}
7473
' --jq '.data.search.edges.[].node.body' \
75-
| grep -oE "#[0-9]{4,}$|#[0-9]{4,}[^0-9<]|$GITHUB_REPOSITORY/issues/[0-9]{4,}" \
76-
| grep -oE "[0-9]{4,}" \
74+
| grep -oE "#[0-9]{3,}$|#[0-9]{3,}[^0-9<&#;]|$GITHUB_REPOSITORY/issues/[0-9]{3,}" \
75+
| grep -oE "[0-9]{3,}" \
7776
| xargs -I{} gh issue view {} --json 'author,url' --jq '[.author.login,.url]' \
7877
| grep -v '/pull/' \
7978
| sed 's/^\["//' \

0 commit comments

Comments
 (0)