Skip to content

fix: CI files only dominate classification when they're the whole change - #3

Merged
zorhehs merged 1 commit into
mainfrom
fix-ci-file-overreach
Aug 21, 2026
Merged

fix: CI files only dominate classification when they're the whole change#3
zorhehs merged 1 commit into
mainfrom
fix-ci-file-overreach

Conversation

@zorhehs

@zorhehs zorhehs commented Aug 21, 2026

Copy link
Copy Markdown
Owner

What

CI/workflow files now only force the ci: type when they make up the
entire staged change, following the same all-or-nothing pattern already
used by allTest/allDocs.

Why

The old hasCI check fired on "any CI file present" — so a commit with
9 new source files and 1 new CI workflow file was classified ci:
instead of feat:.

How I found this

Dogfooded commitcraft on its own initial scaffold commit (10 files: 9
source/doc + 1 CI workflow) — got ci: add 10 files instead of
feat: add 10 files.

Testing

Added a regression test reproducing the exact mixed-file scenario.
Reproduced and verified the fix manually against a fresh 3-file repo:
previously ci: add 3 files, now feat: add 3 files. All 13 tests pass.

Fixes #2

hasCI matched on 'any CI/workflow file present', so a scaffold with
9 new source files and 1 CI workflow file classified as ci: instead
of feat:. Changed to allCI, following the same all-or-nothing pattern
already used by allTest and allDocs — a CI file now only forces the
ci type when the entire staged change is CI-related.

Reproduced the original bug with 3 files (new .go, new README, new
ci.yml) — previously ci: add 3 files, now feat: add 3 files.

Fixes #2
@zorhehs
zorhehs merged commit e410f95 into main Aug 21, 2026
1 check passed
@zorhehs
zorhehs deleted the fix-ci-file-overreach branch August 21, 2026 09:44
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.

Any staged CI workflow file forces the whole commit to "ci:", even as a minority of the change

1 participant