Repository navigation
Check commit subjects in baseline hooks - #371
Open
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
Open
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
Conversation
Generated-by: LLM harness=codex;model=openai:gpt-6.2-sol Generated-by: LLM effort=high;harness=codex:0.166.0;model=openai:gpt-6.2-sol;session=sha-256-64:f69140126b1ce172;surface=exec
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.
Why
The pull request check can reject a commit subject longer than 72 characters after CI starts. Consumer repositories need that feedback when they commit.
Behavior change
The Go, Python, docs, and
chezmoibaselines require the Commit subject hook at thecommit-msgstage. The hook calls@tbhb_rules//lint:commit_subjectwith Git's message file and skips the check when Git setsMERGE_HEAD.Decisions
The Bazel target uses the same checker as the pull request check. It resolves relative message paths from the directory where the caller invoked Bazel. The manifest test compares commit-message hook IDs with each seed configuration.
Risk
Existing repositories need a rules release that exports the target and a hook configuration that calls it. The first run can take longer while Bazel builds the checker.
Verification
bazelisk test //:all //tools:vale_test //lint/... //repo/... //pins/...passed all 278 tests through the available coordinator gate at~/gate-jobs/gate.sh. The requested gate path was absent.bazelisk test //repo/baseline:manifest_test //tools:pytest_testpassed both targets. In the consumer smoke workspace, the hook accepted a valid subject through a relative path and rejected an 81-character subject. With a simulated merge marker, the same hook skipped the check.