Skip to content

ci(pr-lint): Enforce Sentry commit convention and PR description quality#16375

Open
sergical wants to merge 2 commits intomasterfrom
enforce-pr-commit-standards
Open

ci(pr-lint): Enforce Sentry commit convention and PR description quality#16375
sergical wants to merge 2 commits intomasterfrom
enforce-pr-commit-standards

Conversation

@sergical
Copy link
Member

DESCRIBE YOUR PR

Adds automated enforcement of Sentry's commit message convention and PR description quality:

  • GHA workflow (.github/workflows/pr-lint.yml): runs on PR open/edit/sync to master
  • Lint script (scripts/check-pr-lint.ts): validates PR title matches type(scope): subject and description is meaningful (>20 chars after stripping template boilerplate, not a title restatement)
  • Bot skip: dependabot and getsantry PRs are auto-skipped
  • AGENTS.md: replaced "Commit Attribution" with full Sentry commit convention, replaced "Pull Request generation" with 5-point PR quality rules
  • Unified rules: .claude/rules/ now symlinks to .cursor/rules/ as single source of truth, added pr-description.mdc with self-review checklist and description quality rules
  • Commit convention note added to .cursor/rules/contribution-guidelines.mdc

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Co-Authored-By: Claude noreply@anthropic.com

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>
@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Feb 12, 2026 9:45pm
sentry-docs Ready Ready Preview, Comment Feb 12, 2026 9:45pm

Request Review

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>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

/^## SLA/i,
/^## PRE-MERGE CHECKLIST/i,
/^## LEGAL BOILERPLATE/i,
/^## EXTRA RESOURCES/i,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant