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: #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>
  • Loading branch information
lundibundi authored and BethGriggs committed Oct 14, 2020
1 parent 863ba4b commit e8fcbc8
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 @@ -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
Expand Down

0 comments on commit e8fcbc8

Please sign in to comment.