Skip to content

docs(vigutils): document title Refs exemption for merge-commit subjects - #1086

Merged
c-vigo merged 1 commit into
release/1.2.0from
bugfix/1074-title-refs-optional
Jul 14, 2026
Merged

c-vigo merged 1 commit into
release/1.2.0from
bugfix/1074-title-refs-optional

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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_types in validate_title is 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.
  • CI's commit-checks job is the only re-validator of history and is pull_request-only; ranges are merge-base..head with merges skipped.
  • The validate-commit-msg hook 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 readme passes 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.py 34 passed; full just precommit green.

Refs: #1074

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
@c-vigo
c-vigo merged commit 03edb76 into release/1.2.0 Jul 14, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1074-title-refs-optional branch July 14, 2026 17:55
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