From e8fcbc83184deaf5746e15ed87a47b4b931eef95 Mon Sep 17 00:00:00 2001 From: Denys Otrishko Date: Wed, 16 Sep 2020 10:51:30 +0300 Subject: [PATCH] build: fix landed message for multiple commits in commit-queue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/35226 Reviewed-By: Mary Marchini Reviewed-By: Michaƫl Zasso Reviewed-By: Rich Trott Reviewed-By: Antoine du Hamel --- tools/actions/commit-queue.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/actions/commit-queue.sh b/tools/actions/commit-queue.sh index 39f513256916f4..ec2475067965be 100755 --- a/tools/actions/commit-queue.sh +++ b/tools/actions/commit-queue.sh @@ -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