build: fix landed message for multiple commits in commit-queue

PR-URL: https://github.com/nodejs/node/pull/35226
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Denys Otrishko authored and Node.js GitHub Bot committed 2020-10-09 18:37:53 +00:00
1 parent ccfa661d6c
commit ce11b1c395
1 file changed
+8 -2
+8 -2
View File
@@ -7,6 +7,9 @@ REPOSITORY=$2
GITHUB_TOKEN=$3
shift 3
UPSTREAM=origin
DEFAULT_BRANCH=master
API_URL=https://api.github.com
COMMIT_QUEUE_LABEL='commit-queue'
COMMIT_QUEUE_FAILED_LABEL='commit-queue-failed'
@@ -77,9 +80,12 @@ for pr in "$@"; do
git node land --abort --yes
else
rm output
git push origin master
gitHubCurl "$(commentsUrl "$pr")" POST --data '{"body": "Landed in '"$(git rev-parse HEAD)"'"}'
commits="$(git rev-parse $UPSTREAM/$DEFAULT_BRANCH)...$(git rev-parse HEAD)"
git push $UPSTREAM $DEFAULT_BRANCH
gitHubCurl "$(commentsUrl "$pr")" POST --data '{"body": "Landed in '"$commits"'"}'
gitHubCurl "$(issueUrl "$pr")" PATCH --data '{"state": "closed"}'
fi