From d545ce14767e80f140e26ae78f2dd7f531f36abd Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Sat, 15 Aug 2026 04:16:24 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=F0=9F=94=A7=EF=BC=9Atake?= =?UTF-8?q?=20the=20label=20back=20off=20once=20answered?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The label was removed when the queue refused and left in place when it landed, so a merged pull request went on advertising work the queue had already finished. It is a request rather than a state: once answered, either way, it has been spent. Removing it cannot start another run, since `unlabeled` is not one of the events this workflow listens for, and failing to remove it will not fail a run that has already merged. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- .github/workflows/commit-queue.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 3c13dd059..73cfcb05e 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -65,12 +65,25 @@ jobs: NUMBER: ${{ github.event.pull_request.number }} run: node build/tasks/land-pull-request.mts "${NUMBER}" + # The label is a request, not a state: once the queue has answered it, + # one way or the other, it has been spent. Leaving it on a landed pull + # request would say the queue still had something to do. + # + # `unlabeled` is not among the events above, so taking it off cannot + # start another run. Failing to take it off is not worth failing a run + # that has already merged, hence the `|| true`. + - name: Take the label back off + if: always() && steps.token.outcome == 'success' + env: + GH_TOKEN: ${{ steps.token.outputs.token }} + NUMBER: ${{ github.event.pull_request.number }} + run: gh pr edit "$NUMBER" --remove-label commit-queue || true + - name: Say why it did not land - if: failure() + if: failure() && steps.token.outcome == 'success' env: GH_TOKEN: ${{ steps.token.outputs.token }} NUMBER: ${{ github.event.pull_request.number }} RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} run: | - gh pr edit "$NUMBER" --remove-label commit-queue - gh pr comment "$NUMBER" --body "The commit queue did not land this. See $RUN — the label has been removed, so re-apply it once the reason is dealt with." + gh pr comment "$NUMBER" --body "The commit queue did not land this. See $RUN — the label has been taken back off, so re-applying it is a deliberate second try."