diff --git a/develop-docs/sdk/getting-started/templates/pr-template.mdx b/develop-docs/sdk/getting-started/templates/pr-template.mdx index 0e2cebc441f5a3..b1d52ff5ef0d28 100644 --- a/develop-docs/sdk/getting-started/templates/pr-template.mdx +++ b/develop-docs/sdk/getting-started/templates/pr-template.mdx @@ -1,10 +1,71 @@ --- title: PR Template sidebar_order: 30 +description: Canonical .github/pull_request_template.md for Sentry SDK repositories. --- - + + This document uses key words such as "MUST", "SHOULD", and "MAY" as defined + in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to indicate requirement + levels. + -TBD +`.github/pull_request_template.md` is a Markdown file that GitHub pre-fills into the PR description editor when someone opens a pull request. Its job is to guide the author toward writing a real description — not to enforce process through checkboxes. - +## Description + +Every PR description **MUST** cover: + +- **What** — brief description of what the PR does +- **Why** — motivation for the change +- **Alternatives** — other approaches considered, if any +- **Context** — anything reviewers need that isn't obvious from the code + +**Do NOT include:** +- "Test plan" sections +- Checkbox lists of testing steps +- Redundant summaries of the diff + +**Do include:** +- Clear explanation of what and why +- Links to relevant issues or tickets +- Context that isn't obvious from the code +- Notes on specific areas that need careful review + +A blank, template-only, or AI-generated filler description is not acceptable. The CI bot checks description quality; use the `trivial` label to override for genuinely trivial changes (typo fixes, formatting-only commits). + +## Issues + +Reference issues using Linear magic words: + +**Closing** (closes the issue on merge): `close`, `closes`, `closed`, `closing`, `fix`, `fixes`, `fixed`, `fixing`, `resolve`, `resolves`, `resolved`, `resolving`, `complete`, `completes`, `completed`, `completing` + +**Non-closing** (links without closing): `ref`, `refs`, `references`, `part of`, `related to`, `contributes to`, `toward`, `towards` + +## Other Requirements + +- **Draft mode** — PRs **MUST** start as drafts. Mark ready for review once CI passes and the description is complete. Seer AI code review runs automatically when a PR moves out of draft. +- **Changelog** — User-facing changes (`feat`, `fix`, `perf`, breaking) **REQUIRE** a `CHANGELOG.md` entry under `## Unreleased`. +- **AI attribution** — For AI-assisted commits, add `Co-Authored-By: Claude ` in the **commit footer**. Add `🤖 Generated with [Claude Code](https://claude.com/claude-code)` to the PR description when the PR was AI-generated. + +## Template + +Place this file at `.github/pull_request_template.md` in the repository root. + +Use the [`sentry-skills:create-pr`](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/create-pr/SKILL.md) skill to generate PR descriptions that follow this structure and meet the quality bar. + +```markdown +### Description + + + +### Issues + + +```