From b22fae5a227b292b488cf5cb9f7afb06b3d8d750 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 13 Sep 2023 17:06:21 -0500 Subject: [PATCH 1/2] GODRIVER-2981 API comment doesn't work when job approver isn't PR author --- .github/workflows/comment.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml index 3d96238c9c..0b471f3fff 100644 --- a/.github/workflows/comment.yml +++ b/.github/workflows/comment.yml @@ -1,6 +1,7 @@ name: PR API Report on: pull_request_target: + types: [review_requested] jobs: comment: @@ -25,7 +26,7 @@ jobs: set -eux git clone https://github.com/mongodb/mongo-go-driver cd mongo-go-driver - git remote add source https://github.com/$GITHUB_ACTOR/mongo-go-driver + git remote add source https://github.com/$GITHUB_REPOSITORY_OWNER/mongo-go-driver git fetch origin $GITHUB_BASE_REF git fetch source $GITHUB_HEAD_REF git checkout $GITHUB_HEAD_REF @@ -38,4 +39,4 @@ jobs: comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} body-path: 'mongo-go-driver/api-report.md' - edit-mode: replace \ No newline at end of file + edit-mode: replace From 3cc28f4e27c10cb29af5a19ea1c2cbac84a13609 Mon Sep 17 00:00:00 2001 From: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:19:10 -0400 Subject: [PATCH 2/2] Quick update for api changes report. (#1384) --- etc/api_report.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/api_report.sh b/etc/api_report.sh index 1cfbac5025..ffdac7f975 100755 --- a/etc/api_report.sh +++ b/etc/api_report.sh @@ -10,6 +10,7 @@ if [ -z $cmd ]; then fi branch=${GITHUB_BASE_REF:-master} +git fetch origin $branch:$branch sha=$(git merge-base $branch HEAD) gorelease -base=$sha > api-report.txt || true