Skip to content

ci(merge-queue): only run queue job when the queue label is added - #717

Merged
jeduden merged 2 commits into
mainfrom
claude/pr-716-merge-queue-t0kv43
Jul 1, 2026
Merged

ci(merge-queue): only run queue job when the queue label is added#717
jeduden merged 2 commits into
mainfrom
claude/pr-716-merge-queue-t0kv43

Conversation

@jeduden

@jeduden jeduden commented Jul 1, 2026

Copy link
Copy Markdown
Owner

What

Guard the queue job in .github/workflows/merge-queue.yml so the merge-queue action only engages when the label that triggered the run is queue, or on manual workflow_dispatch:

if: >-
  github.event_name == 'workflow_dispatch' ||
  github.event.label.name == 'queue'

Why

The workflow triggers on pull_request: types: [labeled] — i.e. on any label being added — and the job unconditionally ran jeduden/merge-queue-action, which requires token: ${{ secrets.MERGE_QUEUE_TOKEN }}.

On Dependabot PRs, GitHub withholds repository secrets from the run, so the token resolved to empty and the action failed immediately with:

##[error]Input required and not supplied: token

This surfaced on #716 (bump golang.org/x/tools): the queue check went red the moment Dependabot's auto-applied dependencies / go labels landed, even though every other check was green.

Effect

  • Non-queue label events (Dependabot's dependencies/go, or any stray human label) skip the job cleanly — a skipped check, not a red failure.
  • The merge-queue action still runs exactly as before when a maintainer adds the queue label, or on manual dispatch.
  • No secret is exposed to Dependabot-authored runs — the fix is a trigger guard, not a permissions change.

Note: queue is not a required status check (the workflow never runs on an unlabeled PR), so the previous red X was non-blocking but noisy. This removes the noise and stops the action from firing on unrelated labels.

🤖 Generated with Claude Code


Generated by Claude Code

The Merge Queue workflow triggers on pull_request: types: [labeled],
so it fired the merge-queue action on every label. On Dependabot PRs
GitHub withholds secrets.MERGE_QUEUE_TOKEN from the run, so the action
failed with "Input required and not supplied: token" the moment
Dependabot's auto-applied `dependencies`/`go` labels landed (e.g. #716).

Guard the job with an `if` so the action only engages when the added
label is `queue` (or on manual dispatch). Non-queue label events skip
the job cleanly instead of failing, and no secret is exposed to
Dependabot-authored runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKpGw8pbTZHUJsyoFQBs4o
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.63%. Comparing base (f012907) to head (dd46c36).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
Components Coverage Δ
Go 98.62% <ø> (ø)
TypeScript 99.54% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the merge-queue GitHub Actions workflow to avoid running the merge-queue job on unrelated pull_request:labeled events (notably Dependabot’s auto-applied labels), preventing noisy failures when repository secrets are unavailable.

Changes:

  • Add a job-level if: guard so the queue job runs only for workflow_dispatch or when the added label is exactly queue.
  • Document why the guard is needed (Dependabot-labeled runs do not receive MERGE_QUEUE_TOKEN).

Comment thread .github/workflows/merge-queue.yml Outdated
…sure

Secrets are already withheld from Dependabot-authored runs, so the guard
prevents a noisy failure on the absent token — it does not change token
exposure. Reword the comment accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SKpGw8pbTZHUJsyoFQBs4o

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@jeduden jeduden added queue Add to a PR to enqueue it queue:active Applied automatically when a PR is in an active batch and removed queue Add to a PR to enqueue it labels Jul 1, 2026
@jeduden

jeduden commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

🟢 Merge Queue — picked up

This PR is in the queue and will be batched with other queue-labelled PRs.

Next: No action needed — you'll get another comment when CI starts on the batch. View merge queue run.

@jeduden

jeduden commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

🔵 Merge Queue — CI running

Merged into batch branch merge-queue/batch-717-1782928204. View CI run.

Next: No action needed — you'll be notified when CI completes.

@jeduden jeduden removed the queue:active Applied automatically when a PR is in an active batch label Jul 1, 2026
@jeduden
jeduden merged commit 1be6c16 into main Jul 1, 2026
33 checks passed
@jeduden

jeduden commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

Merge Queue — merged

This PR landed on main via commit 1be6c16. CI run that validated the merge.

Next: Done — nothing more to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants