Skip to content

Commit 98e8cff

Browse files
franklinicclaude
andcommitted
fix(ci): make commitlint-autofix workflow more robust
- Add fallback to concurrency group for when workflow_run context is unavailable - Add explicit github.event_name check to job condition - This fixes the "workflow file issue" errors that were occurring 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 40d3c87 commit 98e8cff

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/commitlint-autofix.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
types: [completed]
77

88
concurrency:
9-
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
9+
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.ref }}
1010
cancel-in-progress: true
1111

1212
permissions:
@@ -16,7 +16,9 @@ permissions:
1616
jobs:
1717
auto-fix-commits:
1818
name: Squash and Fix Commit Messages
19-
if: |
19+
# Only run when commitlint fails on a pull_request event
20+
if: >-
21+
github.event_name == 'workflow_run' &&
2022
github.event.workflow_run.conclusion == 'failure' &&
2123
github.event.workflow_run.event == 'pull_request'
2224
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)