Skip to content

docs(contributing): document PR title format to prevent silent CHANGELOG drops#580

Draft
bokelley wants to merge 2 commits intomainfrom
claude/issue-578-commit-subject-convention
Draft

docs(contributing): document PR title format to prevent silent CHANGELOG drops#580
bokelley wants to merge 2 commits intomainfrom
claude/issue-578-commit-subject-convention

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 4, 2026

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 adds scripts/check-commit-msg.sh as 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 includes pre-commit install --hook-type commit-msg so 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 — adds check-commit-msg as a commit-msg-stage local hook. Squash-merge subjects (set by GitHub on merge) bypass it, so the doc convention is the primary safeguard.

What tested

Pre-PR review:

  • code-reviewer: approved — no blockers; removed always_run: true (redundant on commit-msg hooks) and added Dev Setup hook install steps per reviewer notes
  • docs-expert: approved after fix — prose ambiguity in constraint sentence resolved (clarified "description portion only, not type(scope) prefix")

Known limitation (nit, not fixed): The description extraction in check-commit-msg.sh uses ${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 with sed -E if it triggers in practice.

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See adcp#3121
for context.

Session: https://claude.ai/code/session_01RZJ2jX6omDh5V9ua1UKkzy


Generated by Claude Code

claude added 2 commits May 4, 2026 15:10
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release-please: commit-message subjects with parens or quotes silently dropped from CHANGELOG

2 participants