ci(pr-lint): Enforce Sentry commit convention and PR description quality#16375
ci(pr-lint): Enforce Sentry commit convention and PR description quality#16375
Conversation
Add GHA workflow + script to validate PR titles match `type(scope): subject` and descriptions are meaningful (not blank/boilerplate). Bot authors (dependabot, getsantry) are auto-skipped. Unify agent rules so .claude/rules/ symlinks to .cursor/rules/ as single source of truth. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CodeQL flagged /^<!--.*-->$/ as "Bad HTML filtering regexp". Since we match line-by-line, just match lines starting with <!-- instead. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| /^Please give the docs team/i, | ||
| /^Thanks in advance/i, | ||
| /^Look, I get it/i, | ||
| /^\[Sentry Docs contributor guide\]/i, |
There was a problem hiding this comment.
Boilerplate patterns miss bullet-prefixed template lines
High Severity
Three boilerplate patterns use ^ anchors that don't account for the - bullet prefix in the actual PR template. The patterns /^Teamwork makes the dream work/i, /^Please give the docs team/i, and /^\[Sentry Docs contributor guide\]/i never match because the corresponding template lines start with - (e.g. - Teamwork makes the dream work…). These ~240 chars of unstripped boilerplate easily exceed the 20-char minimum, so a PR submitted with the default template and no actual description passes the lint check, defeating its purpose.
Additional Locations (1)
| /^## SLA/i, | ||
| /^## PRE-MERGE CHECKLIST/i, | ||
| /^## LEGAL BOILERPLATE/i, | ||
| /^## EXTRA RESOURCES/i, |
There was a problem hiding this comment.
Header boilerplate patterns are unreachable dead code
Low Severity
The line.startsWith('#') check on line 61 filters out all markdown headers before BOILERPLATE_PATTERNS is consulted. This makes the six header-specific patterns (lines 23–29 like /^## DESCRIBE YOUR PR/i) completely unreachable dead code, since they all start with # and are already eliminated by the earlier check.


DESCRIBE YOUR PR
Adds automated enforcement of Sentry's commit message convention and PR description quality:
.github/workflows/pr-lint.yml): runs on PR open/edit/sync to masterscripts/check-pr-lint.ts): validates PR title matchestype(scope): subjectand description is meaningful (>20 chars after stripping template boilerplate, not a title restatement).claude/rules/now symlinks to.cursor/rules/as single source of truth, addedpr-description.mdcwith self-review checklist and description quality rules.cursor/rules/contribution-guidelines.mdcIS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
Co-Authored-By: Claude noreply@anthropic.com