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 Ӓ as issue #1234
5857contributors2=$( gh api graphql --paginate -F q=" repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from ..$to " -f query='
5958query($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