Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/actions/commit-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COMMIT_QUEUE_FAILED_LABEL="commit-queue-failed"
commit_queue_failed() {
pr=$1

gh pr edit "$pr" --add-label "${COMMIT_QUEUE_FAILED_LABEL}"
gh pr edit "$pr" --add-label "${COMMIT_QUEUE_FAILED_LABEL}" --remove-label "${COMMIT_QUEUE_LABEL}"

# shellcheck disable=SC2154
cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
Expand Down Expand Up @@ -47,9 +47,6 @@ for pr in "$@"; do
continue
fi

# Delete the commit queue label
gh pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL"

if jq -e 'map(.name) | index("commit-queue-squash")' < labels.json; then
MULTIPLE_COMMIT_POLICY="--fixupAll"
elif jq -e 'map(.name) | index("commit-queue-rebase")' < labels.json; then
Expand Down Expand Up @@ -114,6 +111,9 @@ for pr in "$@"; do
gh pr comment "$pr" --body "Landed in $commits"

[ -z "$MULTIPLE_COMMIT_POLICY" ] && gh pr close "$pr"

# Delete the commit queue label (but ignore errors, it's no big deal if a closed PR still has the label)
gh pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL" || true
done

rm -f labels.json
Loading