Skip to content

Commit 7931d99

Browse files
authored
Align generate-release-contributors.sh across repos (open-telemetry#2590)
1 parent 59ba2c7 commit 7931d99

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from_version=$1
1111

1212
# get the date of the first commit that was not in the from_version
13-
from=$(git log --reverse --pretty=format:"%cI" $from_version..HEAD | head -1)
13+
from=$(git log --reverse --pretty=format:"%cI" "$from_version..HEAD" | head -1)
1414

1515
# get the last commit on main that was included in the release
1616
to=$(git merge-base origin/main HEAD | xargs git log -1 --pretty=format:"%cI")
@@ -52,6 +52,8 @@ query($q: String!, $endCursor: String) {
5252

5353
# this query captures authors of issues which have had PRs in the current range reference the issue
5454
# 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
5557
contributors2=$(gh api graphql --paginate -F q="repo:$GITHUB_REPOSITORY is:pr base:main is:merged merged:$from..$to" -f query='
5658
query($q: String!, $endCursor: String) {
5759
search(query: $q, type: ISSUE, first: 100, after: $endCursor) {
@@ -76,15 +78,15 @@ query($q: String!, $endCursor: String) {
7678
| sed 's/^\["//' \
7779
| sed 's/".*//')
7880

79-
# TODO (trask) can remove dependabot line after next release
80-
echo $contributors1 $contributors2 \
81+
echo "$contributors1" "$contributors2" \
8182
| sed 's/ /\n/g' \
8283
| sort -uf \
84+
| grep -v codecov \
8385
| grep -v copilot-pull-request-reviewer \
8486
| grep -v copilot-swe-agent \
8587
| grep -v github-actions \
8688
| grep -v github-advanced-security \
8789
| grep -v linux-foundation-easycla \
88-
| grep -v renovate \
8990
| grep -v otelbot \
91+
| grep -v renovate \
9092
| sed 's/^/@/'

0 commit comments

Comments
 (0)