Add GitHub Action to validate issue/PR template compliance#12541
Add GitHub Action to validate issue/PR template compliance#12541rodrigobnogueira wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12541 +/- ##
=======================================
Coverage 98.94% 98.94%
=======================================
Files 131 131
Lines 46622 46622
Branches 2414 2414
=======================================
Hits 46132 46132
Misses 367 367
Partials 123 123
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Adds a Check Template workflow triggered on issue and PR open/edit events. It validates that: - Bug report version fields contain actual output, not just the default placeholder commands - Required issue sections (Describe the bug, To Reproduce, Expected behavior) are not left empty - PR descriptions include the template sections and have content in the 'What do these changes do?' section - PRs are not opened from the fork's default branch When violations are detected, the workflow applies the 'invalid' label, posts an explanatory comment, and closes the submission. It skips bot-authored items and avoids duplicate comments on re-edits. Maintainers can bypass validation by adding bot:chronographer:skip or backport:skip labels before the check runs. Fixes aio-libs#12163
e2f15c0 to
b836e74
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
|
I'm even more concerned about this now, as we have AGENTS.md ensuring that AI contributions follow the template now, and this week I've seen a couple of obviously human-written PRs that didn't follow the template, and I'm grateful they didn't make me read through the whole template for what could be said in 1 line. This will now only close human PRs. I've also now unsubscribed from PR notifications, so I have no way to audit this workflow and know that legitimate PRs are getting closed incorrectly. |
What do these changes do?
Adds a
Check TemplateGitHub Actions workflow (.github/workflows/check-template.yml) that automatically validates issue and PR descriptions against the repository templates.For issues (bug reports):
$ python --versionwith no actual output)ISSUE_TEMPLATE.md)For PRs:
When violations are found, the workflow:
invalidlabel for triageSafeguards:
bot:chronographer:skiporbackport:skiplabelsPrior validation on fork:
Are there changes in behavior for the user?
No changes to the library itself. This only affects the GitHub repository workflow for contributors: issues and PRs that do not follow the templates will now be automatically flagged and closed with a comment explaining what needs to be fixed.
Is it a substantial burden for the maintainers to support this?
No — this is a standalone GitHub Actions workflow with no dependencies on the codebase. It can be disabled by simply deleting the file or adding a
workflow_dispatchcondition. The label-based bypass mechanism means maintainers can override it at any time.Related issue number
Fixes #12163
Checklist
CONTRIBUTORS.txtCHANGES/folder