Skip to content

Commit 3d00a85

Browse files
bougymanclaude
andauthored
fix(ci): skip commit-subject validation in the post-merge pipeline (#41)
## Summary Closes #40. `main.yaml`'s `validate` job calls `ci.yaml` as a reusable workflow, running both `Test` and `Validate Commit Subjects` post-merge. The commit-subject check only makes sense pre-merge (should this PR be mergeable) - by the time `main.yaml` runs, the commits are already merged, so re-checking their subjects is meaningless. `Test` still re-runs post-merge (verifies the actual merge result); commit-subject validation no longer does. Added a `skip_commit_validation` `workflow_call` input on `ci.yaml` (default `false`, so its own `pull_request`/`workflow_dispatch` triggers are unaffected), and `main.yaml`'s `validate` job now passes `skip_commit_validation: true`. ## Test plan - [x] Both edited workflow files validated with `ruby -ryaml` - [x] Confirmed the `if: inputs.skip_commit_validation != true` expression safely defaults to running the job for every trigger type that doesn't explicitly pass the input (pull_request, workflow_dispatch) - `inputs.skip_commit_validation` evaluates to `null` there, and `null != true` is `true` Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 30dc6dc commit 3d00a85

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ name: CI
44
on: # yamllint disable-line rule:truthy
55
workflow_dispatch:
66
workflow_call:
7+
inputs:
8+
skip_commit_validation:
9+
description: >-
10+
Skip the commit-subject check - it only makes sense pre-merge
11+
(should this PR be mergeable), not as a post-merge gate.
12+
required: false
13+
type: boolean
14+
default: false
715
pull_request:
816

917
jobs:
@@ -43,6 +51,7 @@ jobs:
4351
run: mix test
4452

4553
conventional_commits:
54+
if: inputs.skip_commit_validation != true
4655
name: Validate Commit Subjects
4756
runs-on: ubuntu-latest
4857
steps:

.github/workflows/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
validate:
1919
name: Validations
2020
uses: ./.github/workflows/ci.yaml
21+
with:
22+
skip_commit_validation: true
2123

2224
manage-release-pr:
2325
needs: [validate]

0 commit comments

Comments
 (0)