Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/scripts/generate-release-contributors.sh
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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 &#1234; 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) {
Expand All @@ -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/^\["//' \
Expand Down
Loading