|
@@ -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:
|
|
@@ -13,11 +10,12 @@
|
|
|
from_version=$1
|
|
|
|
|
|
# get the date of the first commit that was not in the from_version
|
|
|
-from=$(git log --reverse --pretty=format:"%cI" $from_version..HEAD | head -1)
|
|
|
+from=$(git log --reverse --pretty=format:"%cI" "$from_version..HEAD" | head -1)
|
|
|
|
|
|
# get the last commit on main that was included in the release
|
|
|
to=$(git merge-base origin/main HEAD | xargs git log -1 --pretty=format:"%cI")
|
|
|
|
|
|
+# shellcheck disable=SC2016 # "Expressions don't expand in single quotes"
|
|
|
contributors1=$(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) {
|
|
@@ -55,6 +53,7 @@ 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)
|
|
|
+# shellcheck disable=SC2016 # "Expressions don't expand in single quotes"
|
|
|
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) {
|
|
@@ -79,7 +78,7 @@ query($q: String!, $endCursor: String) {
|
|
|
| sed 's/^\["//' \
|
|
|
| sed 's/".*//')
|
|
|
|
|
|
-echo $contributors1 $contributors2 \
|
|
|
+echo "$contributors1" "$contributors2" \
|
|
|
| sed 's/ /\n/g' \
|
|
|
| sort -uf \
|
|
|
| grep -v linux-foundation-easycla \
|