GeezerVison is showing github.com — tools: delay removal of `commit-queue` label · nodejs/node@7d9dcfa
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tools/actions/commit-queue.sh +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ COMMIT_QUEUE_FAILED_LABEL="commit-queue-failed" |
15 | 15 | commit_queue_failed() { |
16 | 16 | pr=$1 |
17 | 17 |
|
18 | | - gh pr edit "$pr" --add-label "${COMMIT_QUEUE_FAILED_LABEL}" |
| 18 | + gh pr edit "$pr" --add-label "${COMMIT_QUEUE_FAILED_LABEL}" --remove-label "${COMMIT_QUEUE_LABEL}" |
19 | 19 |
|
20 | 20 | # shellcheck disable=SC2154 |
21 | 21 | cqurl="${GITHUB_SERVER_URL}/${OWNER}/${REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" |
@@ -47,9 +47,6 @@ for pr in "$@"; do |
47 | 47 | continue |
48 | 48 | fi |
49 | 49 |
|
50 | | - # Delete the commit queue label |
51 | | - gh pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL" |
52 | | - |
53 | 50 | if jq -e 'map(.name) | index("commit-queue-squash")' < labels.json; then |
54 | 51 | MULTIPLE_COMMIT_POLICY="--fixupAll" |
55 | 52 | elif jq -e 'map(.name) | index("commit-queue-rebase")' < labels.json; then |
@@ -114,6 +111,9 @@ for pr in "$@"; do |
114 | 111 | gh pr comment "$pr" --body "Landed in $commits" |
115 | 112 |
|
116 | 113 | [ -z "$MULTIPLE_COMMIT_POLICY" ] && gh pr close "$pr" |
| 114 | + |
| 115 | + # Delete the commit queue label (but ignore errors, it's no big deal if a closed PR still has the label) |
| 116 | + gh pr edit "$pr" --remove-label "$COMMIT_QUEUE_LABEL" || true |
117 | 117 | done |
118 | 118 |
|
119 | 119 | rm -f labels.json |