Skip to content

Commit e8fcbc8

Browse files
lundibundiBethGriggs
authored andcommittedOct 14, 2020
build: fix landed message for multiple commits in commit-queue
PR-URL: #35226 Reviewed-By: Mary Marchini <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 863ba4b commit e8fcbc8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎tools/actions/commit-queue.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ REPOSITORY=$2
77
GITHUB_TOKEN=$3
88
shift 3
99

10+
UPSTREAM=origin
11+
DEFAULT_BRANCH=master
12+
1013
API_URL=https://api.github.com
1114
COMMIT_QUEUE_LABEL='commit-queue'
1215
COMMIT_QUEUE_FAILED_LABEL='commit-queue-failed'
@@ -77,9 +80,12 @@ for pr in "$@"; do
7780
git node land --abort --yes
7881
else
7982
rm output
80-
git push origin master
8183

82-
gitHubCurl "$(commentsUrl "$pr")" POST --data '{"body": "Landed in '"$(git rev-parse HEAD)"'"}'
84+
commits="$(git rev-parse $UPSTREAM/$DEFAULT_BRANCH)...$(git rev-parse HEAD)"
85+
86+
git push $UPSTREAM $DEFAULT_BRANCH
87+
88+
gitHubCurl "$(commentsUrl "$pr")" POST --data '{"body": "Landed in '"$commits"'"}'
8389

8490
gitHubCurl "$(issueUrl "$pr")" PATCH --data '{"state": "closed"}'
8591
fi

0 commit comments

Comments
 (0)