Repository navigation
docs(vigutils): document title Refs exemption for merge-commit subjects - #1086
Merged
Merged
Conversation
Investigated whether refs_optional_types=approved_types in validate_title lets a merge commit land on dev that would fail full commit validation. It cannot: validate_commits() skips merge commits (is_merge), CI's commit-checks job is the only re-validator of history, and the commit-msg hook never fires on GitHub's server-side merges. Document the exemption at the call site and pin the end-to-end scenario (a Refs-requiring docs: title passing as a merge subject) with a regression test. Single commit rather than RED-GREEN: no behavior changes, the new test passes against existing code and documents the exemption. Refs: #1074
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.
Implements #1074 (review follow-up from #1068).
Investigation verdict: merge-commit subjects are exempt from Refs enforcement downstream, so the looser
refs_optional_types=approved_typesinvalidate_titleis safe and now documented rather than changed:validate_commits()skips merges (commit.is_merge) — the --no-ff merge subject a PR title becomes never faces the Refs rule.commit-checksjob is the only re-validator of history and is pull_request-only; ranges are merge-base..head with merges skipped.validate-commit-msghook is commit-msg-stage: fires on local commits only, never on GitHub's server-side merges.Change: call-site comment explaining the mechanism + end-to-end regression test (
docs: update readmepasses as title, passes as merge subject, still fails as a plain commit). No behavior change, hence single commit (TDD note in body) and no changelog entry.Evidence:
test_validate_commit_range.py34 passed; fulljust precommitgreen.Refs: #1074