Skip to content

fix(ci): guard ci-auto-fix.yml against non-pull_request events#61

Merged
github-actions[bot] merged 1 commit into
mainfrom
dan/DAN-1639-ci-auto-fix-trigger
Jul 1, 2026
Merged

fix(ci): guard ci-auto-fix.yml against non-pull_request events#61
github-actions[bot] merged 1 commit into
mainfrom
dan/DAN-1639-ci-auto-fix-trigger

Conversation

@dizhaky

@dizhaky dizhaky commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • ci-auto-fix.yml declares on: pull_request only, but is showing 6/6 workflow-level failures triggered by push events to main (confirmed via gh api actions/runs/<id>: event=push, pull_requests=[]).
  • Root cause: concurrency.group: auto-fix-${{ github.event.pull_request.number }} references a null field on push events; an unresolvable expression in concurrency.group produces a workflow-level config failure rather than a clean skip.
  • Fix: fallback to github.sha in the concurrency group expression, plus an explicit github.event_name == 'pull_request' short-circuit on the job-level if:.

Test plan

  • This PR itself is a pull_request: opened event — its own CI Auto-Fix run should complete normally (not fail) once merged/pushed to, proving the guard doesn't break the real trigger path
  • Confirm no failed CI Auto-Fix check appears on the next direct push to main after merge

🤖 Generated with Claude Code

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]>
@linear-code

linear-code Bot commented Jul 1, 2026

Copy link
Copy Markdown

DAN-1639

@github-actions
github-actions Bot merged commit 7a0b8ee into main Jul 1, 2026
13 of 19 checks passed
@github-actions
github-actions Bot deleted the dan/DAN-1639-ci-auto-fix-trigger branch July 1, 2026 04:21
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🔎 Lint report: dan/DAN-1639-ci-auto-fix-trigger vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8604 on HEAD, 8604 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4573 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

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.

1 participant