docs(contributing): document PR title format to prevent silent CHANGELOG drops#580
Draft
docs(contributing): document PR title format to prevent silent CHANGELOG drops#580
Conversation
…e CHANGELOG drops Commit subjects with embedded ( ) or " in the description silently drop from release-please's CHANGELOG (verified in run 25326163877, three commits lost from v4.4.0). Root cause: the parser treats those characters as grammar tokens. Adds a "PR Title Format" subsection to CONTRIBUTING.md explaining the causal chain (squash-merge → commit subject → release-please parser) with before/after examples from the three affected commits (#577, #566, #443). Also adds scripts/check-commit-msg.sh and a pre-commit commit-msg stage hook as a best-effort guardrail for direct commits. Squash-merge subjects (set by GitHub from the PR title) bypass it, so the docs convention is the primary fix. Refs #578 https://claude.ai/code/session_01RZJ2jX6omDh5V9ua1UKkzy
- Prose: clarify that paren/quote ban applies to the description portion only, not to type(scope) prefix; add parenthetical to prevent misreading - Dev Setup: add pre-commit hook installation steps so new contributors get the commit-msg hook active without reading the PR Title section - pre-commit config: remove always_run on commit-msg hook (redundant) https://claude.ai/code/session_01RZJ2jX6omDh5V9ua1UKkzy
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.
Closes #578
release-please silently drops conventional commits from the CHANGELOG when their subjects contain
(,), or"in the description portion (verified in run 25326163877: three commits missing from v4.4.0). Since this repo uses squash merges, the PR title becomes the commit subject — keeping the title free of those characters is the primary fix. This PR documents that convention in CONTRIBUTING.md with before/after examples from the three affected commits, and addsscripts/check-commit-msg.shas a commit-msg pre-commit hook to catch violations on direct commits.What changed
CONTRIBUTING.md— new "PR Title Format" subsection under Pull Request Process: causal chain (squash-merge → commit subject → release-please parser), bolded constraint, before/after examples, note on where to put moved details. Dev Setup step 2 now includespre-commit install --hook-type commit-msgso new contributors get the hook without having to find the section.scripts/check-commit-msg.sh— executable bash script; validates that conventional-commit descriptions contain no(,), or". Prints an actionable error with the offending subject and a corrected example. No-ops on non-conventional-commit messages..pre-commit-config.yaml— addscheck-commit-msgas acommit-msg-stage local hook. Squash-merge subjects (set by GitHub on merge) bypass it, so the doc convention is the primary safeguard.What tested
bash -n scripts/check-commit-msg.sh— shell syntax cleanpython -c "import yaml; yaml.safe_load(...)"on updated.pre-commit-config.yaml: valid YAMLPre-PR review:
always_run: true(redundant on commit-msg hooks) and added Dev Setup hook install steps per reviewer notestype(scope)prefix")Known limitation (nit, not fixed): The description extraction in
check-commit-msg.shuses${subject#*: }which could false-positive on a scope containing colon-space (e.g.,fix(api: v2): add foo). Standard scope names don't contain spaces, so this is a low-risk edge case. A follow-up can tighten the extraction withsed -Eif it triggers in practice.Session: https://claude.ai/code/session_01RZJ2jX6omDh5V9ua1UKkzy
Generated by Claude Code