Summary
The block-remove-before-merge.yml workflow (added in #1729, merge commit 079c558) is triggered on merge_group events but cannot work on them, and will fail the run — which would jam the merge queue if/when it's enabled.
Details
The workflow triggers on both pull_request and merge_group:
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
But it derives the PR number from the pull_request context, which is empty on merge_group events:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
FILES=$(gh api repos/$REPO/pulls/$PR_NUMBER/files --paginate --jq '.[].filename')
On a merge_group event PR_NUMBER is empty, so the call becomes gh api repos/$REPO/pulls//files, which 404s. GitHub Actions runs run: blocks with set -eo pipefail, so the failed command substitution fails the step.
Impact
Currently dormant — the merge queue is not enabled (every run of this workflow so far is a pull_request event; there are no merge_group runs). So this does not break anything today. It is a latent issue: whoever enables the merge queue later will see every merge-queue run fail with a confusing, seemingly-unrelated error.
Suggested fix
The check is inherently PR-scoped, so it should not do its work on merge_group. Either:
If this is intended to be a required status check under a future merge queue, instead short-circuit to success on merge_group (so the queue still sees a green check) rather than skipping the job.
Summary
The
block-remove-before-merge.ymlworkflow (added in #1729, merge commit 079c558) is triggered onmerge_groupevents but cannot work on them, and will fail the run — which would jam the merge queue if/when it's enabled.Details
The workflow triggers on both
pull_requestandmerge_group:But it derives the PR number from the
pull_requestcontext, which is empty onmerge_groupevents:On a
merge_groupeventPR_NUMBERis empty, so the call becomesgh api repos/$REPO/pulls//files, which 404s. GitHub Actions runsrun:blocks withset -eo pipefail, so the failed command substitution fails the step.Impact
Currently dormant — the merge queue is not enabled (every run of this workflow so far is a
pull_requestevent; there are nomerge_groupruns). So this does not break anything today. It is a latent issue: whoever enables the merge queue later will see every merge-queue run fail with a confusing, seemingly-unrelated error.Suggested fix
The check is inherently PR-scoped, so it should not do its work on
merge_group. Either:Remove the
merge_group:trigger, orSkip the job on non-PR events:
If this is intended to be a required status check under a future merge queue, instead short-circuit to success on
merge_group(so the queue still sees a green check) rather than skipping the job.