fix(ci): guard ci-auto-fix.yml against non-pull_request events#61
Merged
Merged
Conversation
Workflow declares on: pull_request only, but was showing workflow-level
failures (zero jobs run, conclusion=failure) triggered by push events to
main (event=push, pull_requests=[]) — 6/6 recent runs failing.
Root cause: concurrency.group referenced
${{ github.event.pull_request.number }}, which is null on a push event.
An unresolvable expression in concurrency.group appears to produce a
workflow-level config failure rather than a clean skip.
Fix:
- concurrency.group falls back to github.sha when pull_request.number
is unset, so the expression always resolves.
- job-level if: now checks github.event_name == 'pull_request' first,
short-circuiting before touching github.event.pull_request on other
event types.
Discovered via 2026-06-30 daily-repo-scan (DAN-1639).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
🔎 Lint report:
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ci-auto-fix.ymldeclareson: pull_requestonly, but is showing 6/6 workflow-level failures triggered bypushevents tomain(confirmed viagh api actions/runs/<id>:event=push,pull_requests=[]).concurrency.group: auto-fix-${{ github.event.pull_request.number }}references a null field on push events; an unresolvable expression inconcurrency.groupproduces a workflow-level config failure rather than a clean skip.github.shain the concurrency group expression, plus an explicitgithub.event_name == 'pull_request'short-circuit on the job-levelif:.Test plan
pull_request: openedevent — its own CI Auto-Fix run should complete normally (not fail) once merged/pushed to, proving the guard doesn't break the real trigger pathCI Auto-Fixcheck appears on the next direct push tomainafter merge🤖 Generated with Claude Code