Repository navigation
PR checks: reject untouched PR template placeholders (#965) - #1037
Merged
Merged
Conversation
Fixes xcl-dev#965. Extract each required section up to the next template heading, strip HTML comments and bare bullet markers, and ignore verbatim placeholder lines from .github/pull_request_template.md.
Collaborator
|
Merged in dc6a283 – thanks. It conflicted with #995's |
This was referenced Nov 24, 2026
Rareuncommon
added a commit
to Rareuncommon/xcl
that referenced
this pull request
Nov 24, 2026
… removed first Rebuilt on main after xcl-dev#965 / xcl-dev#1037, which took over the empty-section and template-placeholder part of this change. What is left: - A section name in bold at the end of a sentence was taken for the section's heading. When the sentence came before the real section, the real one was never read: a filled description was reported empty. - The heading search could start inside an HTML comment, so a section commented out as a whole passed. - An unclosed <!-- hides the rest of the description on GitHub but was still read as text. section_texts() returns what is under each heading (comments removed, heading lines of their own at both ends); section_has_content() keeps main's placeholder rule over it. scripts/test_pr_check.py: SectionHeadingTests, seven tests; three fail on main's check. Assisted-by: Claude Code (Claude Fable 5.2)
CalvyPZ
pushed a commit
to CalvyPZ/xcl
that referenced
this pull request
Nov 24, 2026
xcl-dev#1037 made the hint lines of .github/pull_request_template.md count as empty, but the outline in CONTRIBUTING.md ("PR description") has hint lines of its own, and AGENTS.md tells agents to write to that outline. Pasted unedited, it passed the Tested, Not tested and AI use checks. Its six hint lines under those sections are placeholders now too. Checked against the descriptions of 1,200 PRs of this repository: no verdict changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #965.
Previously
scripts/pr_check.pychecked required sections with\*\*<section>\*\*\s*\n\s*\S, so an untouched.github/pull_request_template.mdpassed Tested, Not tested, and AI use because the template's placeholder lines and bare-bullet matched\S.What is in it
scripts/pr_check.py: addsection_has_content()to extract each required section up to the next template heading, strip HTML comments and leading bullet markers, and ignore the verbatim placeholder lines from.github/pull_request_template.md.scripts/test_pr_check.py: addTemplatePlaceholderTestsverifying that the untouched.github/pull_request_template.mdfails all three required sections, bare bullets/comments alone fail, and sections with real content pass.Tested
python -m unittest discover -s scripts -v: 8 passed, 0 failedsection_has_content()against the 20 most recently merged PRs onivall/xcl: 0 false positives (only README: point the Discord invite at discord.gg/xcl #771 lacked an**AI use**heading altogether).python scripts/pr_check.py --localon this PR's description and changed files:description okRegression run
scripts/pr_check.pyandscripts/test_pr_check.py(no files undercrates/xcl/src/).Not tested
pull_request_targetexecution (usesmain's copy ofscripts/pr_check.pyuntil merged).AI use