fix: CI files only dominate classification when they're the whole change - #3
Merged
Conversation
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
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.
What
CI/workflow files now only force the
ci:type when they make up theentire staged change, following the same all-or-nothing pattern already
used by
allTest/allDocs.Why
The old
hasCIcheck fired on "any CI file present" — so a commit with9 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 filesinstead offeat: 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, nowfeat: add 3 files. All 13 tests pass.Fixes #2