chore(#113): require Testing section in PR body (config-driven)#124
Merged
Conversation
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
Replaces the hardcoded Glossary-only section check in
validate-pr-create.shwith a config-driven required-sections list. Shipped default is["Testing", "Glossary"]— matches the canonical PR description shape inworkflows/code-review.md. Forks extend, restrict, or replace via.claude/project-config.json→.pr.required_sections[].Closes the gap where
pr-quality.mdlists Testing as part of the canonical PR description butvalidate-pr-create.shonly enforced Glossary — asymmetric between written rule and mechanical gate..claude/hooks/validate-pr-create.sh— rewrote the Glossary block as a generic required-sections loop; loads list + skip marker from the shared config reader ([Chore] Make ticket-prefix whitelist + schema project-configurable (not hardcoded) #109); inline fallback matches shipped defaults..claude/project-config.defaults.json— extended theprsubtree withrequired_sections+skip_marker..claude/hooks/tests/test_validate_pr_required_sections.sh— 8 cases covering pass/fail per section, missing-both, skip marker, case-insensitivity, H3 rejection.docs/rule-audit.md— updated the section 3 row + new[^pr-sections-113]footnote.Testing
Also dogfood: this PR itself has Testing + Glossary + Summary sections — the now-live-on-branch hook let it through when I ran
gh api .../pulls -X POSTwith this body.What a fork tweaks
Strict teams might add
Rollback Plan, a service-delivery team might addOperational Impact:{ "pr": { "required_sections": ["Summary", "Testing", "Glossary", "Rollback Plan"], "skip_marker": "<!-- pr-sections: skip -->" } }Trivial-PR bypass marker (for lint-only fixes, version bumps):
Printed to stderr as a WARN when it fires, grep-able so bypasses stay auditable.
Scope — what this does NOT do
code-revieweragent still applies judgement there.code-revieweragent still calls Glossary out by name).Follow-ups
Glossary
[Testing, Glossary].grep -r.## Namematches,### Namedoes not — the canonical PR template uses H2 for the section anchors.Closes #113