You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: hook install --commit-msg installs a trailer normalizer, not a gate, so requireTrailers fails only in CI #299
The author gets no signal at the moment they could act (writing the message) and a red build afterwards.
Second problem: the fallback range reaches back before adoption
recent-fallback validated HEAD~5..HEAD, which included three commits made before Charter was added to the repo. Those commits cannot be fixed without rewriting published history, so a repo that adopts Charter starts with a red gate and no clean way to go green other than disabling the gate — which is what I did.
Impact
requireTrailers: true is the default from bootstrap, so this is the default first-push experience for a repo with existing history. It also undermines the local hooks: they are installed, they pass, and CI disagrees with them. (Related: #289, closed, and #292.)
Suggested fix
Make the commit-msg hook the gate when requireTrailers is on: reject a commit whose message lacks the required trailer, with a one-line example of the expected format, rather than silently normalizing.
Baseline the validation range at adoption. Record the commit that introduced .charter/config.json and validate only commits after it, or support git.validateSince in config.
If the threshold is HIGH, say in the failure output what makes a commit HIGH-risk and which trailer would satisfy it. The current suggestion ("Consider linking significant changes to ADRs") does not name the required trailer or its format.
Environment
@stackbilt/[email protected], Node 22.14, WSL2, GitHub Actions Governance Check workflow generated by charter bootstrap --ci github.
Activity
fix(hook): mirror loadConfig defaults in the commit-msg gate (refs #299)
fix(git): reject whitespace-only trailer values (#345)