Repository navigation
feat(vigutils): add --require-scope flag and strict-by-default hook config - #78
Merged
Merged
Conversation
Allow projects to enforce that all commits include at least one scope by using the --require-scope flag. When enabled, commits without scopes (e.g., 'feat: description') are rejected; commits with one or more scopes (e.g., 'feat(api): description') are accepted. Refs: #58
Add reference to package documentation. Refs: #58
Refs: #58
- Add missing `f` prefix to require-scope error message in validate_commit_msg - Use a scoped commit message in test_git_commit_ssh_signature to satisfy the workspace pre-commit config's --require-scope enforcement Refs: #58
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.
Summary
--require-scopeCLI flag tovalidate-commit-msgto mandate that all commits include at least one scope; scopeless commits are rejected when the flag is setvalidate-commit-msghook with explicit default args (strict-by-default) instead of commented-out examples, lowering the barrier to enforcement for new projects--require-scopein thevig-utilsREADMETest plan
--require-scoperejects commits without a scope (e.g.feat: description)--require-scopeaccepts commits with one or more scopes (e.g.feat(api): description)uv run pytest packages/vig-utils/tests/test_validate_commit_msg.py)uv run pre-commit run --all-files)Refs: #58