Skip to content

Block commit types outside the allowed set - #257

Merged
fcakyon merged 2 commits into
mainfrom
commit-type-guard
Jul 24, 2026
Merged

Block commit types outside the allowed set#257
fcakyon merged 2 commits into
mainfrom
commit-type-guard

Conversation

@fcakyon

@fcakyon fcakyon commented Jul 24, 2026

Copy link
Copy Markdown
Owner

The commit-staged skill lists seven allowed types, but nothing enforced them, so chore: slipped into three commits today.

  • denies any commit type outside the seven
  • catches chained commands the existing confirm hook misses
  • 15 tests: heredocs, apostrophes, --amend, Codex argv arrays
$ git add -A && git commit -m "chore: bump versions"
"chore" is not an allowed commit type. Use one of feat, fix, refactor, docs,
style, test, build, written as type then a colon then a brief description.
Pick the type that fits and commit again.

A commit with no -m passes, since the subject lives in the editor where the hook cannot see it. That also lets a conflicted merge keep git's generated subject.

fcakyon added 2 commits July 24, 2026 22:23
Denies a commit whose subject uses a type outside the seven the commit-staged skill lists.
Keeps github-dev at 2.7.0 over the 2.6.1 that landed with the author change.
@fcakyon fcakyon self-assigned this Jul 24, 2026
@fcakyon
fcakyon merged commit 8b32235 into main Jul 24, 2026
3 checks passed
@fcakyon
fcakyon deleted the commit-type-guard branch July 24, 2026 20:23
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