Skip to content

Commit

Permalink
build: fix landed message for multiple commits in commit-queue
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#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]>
  • Loading branch information
lundibundi authored and aduh95 committed Oct 9, 2020
1 parent c8b950a commit 9cf2037
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/actions/commit-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -76,9 +79,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
Expand Down

0 comments on commit 9cf2037

Please sign in to comment.