From f99cf14f718d36fc5d1d900a7e366e6660ac8d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Daxb=C3=B6ck?= Date: Tue, 10 Mar 2026 21:47:08 +0100 Subject: [PATCH 1/2] docs(sdk): Add PR template page and updater skill Add canonical .github/pull_request_template.md content for Sentry SDK repositories, derived from the sentry-skills:create-pr skill and code submission standards. The docs page covers description structure (what, why, alternatives, context), Linear magic words for issue references, and requirements for draft mode, changelog entries, and AI attribution. The pr-template skill fetches both the docs page and the create-pr skill at runtime and uses them to update existing templates across SDK repos, with a batch rollout table for the 8 non-compliant repositories. Co-Authored-By: Claude --- .agents/skills/pr-template/SKILL.md | 147 ++++++++++++++++++ .../getting-started/templates/pr-template.mdx | 67 +++++++- 2 files changed, 211 insertions(+), 3 deletions(-) create mode 100644 .agents/skills/pr-template/SKILL.md diff --git a/.agents/skills/pr-template/SKILL.md b/.agents/skills/pr-template/SKILL.md new file mode 100644 index 0000000000000..d1deb2b203058 --- /dev/null +++ b/.agents/skills/pr-template/SKILL.md @@ -0,0 +1,147 @@ +--- +name: pr-template +description: Update .github/pull_request_template.md in a Sentry SDK repository to match the canonical template. Use when asked to "update pr template", "sync pr template", "standardize pr template", or when rolling out the canonical template across SDK repos. +--- + +# PR Template Updater + +Updates `.github/pull_request_template.md` in a Sentry SDK repository using two sources of truth: + +- **[PR Template docs](https://develop.sentry.dev/sdk/getting-started/templates/pr-template/)** — defines the canonical template content +- **[`sentry-skills:create-pr`](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/create-pr/SKILL.md)** — defines how PRs are written and what structure the template must support + +**Requires**: GitHub CLI (`gh`) authenticated and available, with push access to the target repository. + +## Step 1: Read the sources of truth + +Fetch the canonical template and the pr-writer skill: + +```bash +# Canonical template (read the Template section) +curl -s https://develop.sentry.dev/sdk/getting-started/templates/pr-template.md + +# PR writer skill +curl -s https://raw.githubusercontent.com/getsentry/skills/main/plugins/sentry-skills/skills/create-pr/SKILL.md +``` + +The canonical template content is: + +```markdown +### Description + + + +### Issues + + +``` + +Linear magic words for the Issues section: + +- **Closing**: `close`, `closes`, `closed`, `closing`, `fix`, `fixes`, `fixed`, `fixing`, `resolve`, `resolves`, `resolved`, `resolving`, `complete`, `completes`, `completed`, `completing` +- **Non-closing**: `ref`, `refs`, `references`, `part of`, `related to`, `contributes to`, `toward`, `towards` + +## Step 2: Read the existing template + +```bash +cat .github/pull_request_template.md 2>/dev/null \ + || cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null \ + || echo "NO TEMPLATE" +``` + +Note any repo-specific content that must be preserved: + +- **`sentry-cli`**: Legal boilerplate clause for external contributors — keep it. +- **`sentry-go`**: `### Changelog Entry` section used by Craft release tooling — keep it. +- Any other non-standard section: flag it before removing. + +## Step 3: Write the updated template + +For most repositories, the new content is the canonical template verbatim. For repositories with preserved additions, append them after the `### Issues` block. + +Example for `sentry-cli`: + +```markdown +### Description + + + +### Issues + + + +### Legal Boilerplate + +Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. +``` + +## Step 4: Create a branch and commit + +```bash +git checkout -b /meta/standardize-pr-template + +git add .github/pull_request_template.md +git commit -m "meta: Standardize PR template + +Align .github/pull_request_template.md with the canonical Sentry SDK +template at https://develop.sentry.dev/sdk/getting-started/templates/pr-template/. + +Removes checklist sections and 'How did you test it?' prompts that +contradict the code submission standards." +``` + +## Step 5: Open a draft PR + +```bash +gh pr create --draft \ + --title "meta: Standardize PR template" \ + --body "$(cat <<'EOF' +### Description + +Aligns `.github/pull_request_template.md` with the canonical Sentry SDK template. + +Removes sections that contradict the [code submission standards](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/): checklist checkboxes, 'How did you test it?' prompts, and type-of-change radio buttons. + +### Issues + +* Refs https://develop.sentry.dev/sdk/getting-started/templates/pr-template/ + +🤖 Generated with [Claude Code](https://claude.com/claude-code) +EOF +)" +``` + +## Batch Rollout + +To update multiple repos at once, run this skill in parallel agents — one per repository. Target repositories where the current template conflicts with the standards: + +| Repo | Issue | +|------|-------| +| `getsentry/sentry-java` | "How did you test it?" + checklist | +| `getsentry/sentry-cocoa` | "How did you test it?" + checklist | +| `getsentry/sentry-dart` | "How did you test it?" + checklist | +| `getsentry/sentry-kotlin-multiplatform` | "How did you test it?" + checklist | +| `getsentry/sentry-react-native` | "How did you test it?" + checklist + type-of-change | +| `getsentry/sentry-javascript` | Checkbox list | +| `getsentry/sentry-ruby` | Prose instruction list | +| `getsentry/sentry-dotnet` | No template exists — create it | + +Repositories `sentry-python`, `sentry-symfony`, `sentry-rust`, `sentry-php`, `sentry-laravel`, and `sentry-elixir` already match the canonical template and need no changes. + +## References + +- [PR Template](https://develop.sentry.dev/sdk/getting-started/templates/pr-template/) +- [Code Submission Standards](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/) +- [PR Writer Skill](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/create-pr/SKILL.md) diff --git a/develop-docs/sdk/getting-started/templates/pr-template.mdx b/develop-docs/sdk/getting-started/templates/pr-template.mdx index 0e2cebc441f5a..b1d52ff5ef0d2 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 + + +``` From d4ec4cf7a55ec61c643bc8f5d6ab6e531a6876bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Daxb=C3=B6ck?= Date: Tue, 10 Mar 2026 22:01:54 +0100 Subject: [PATCH 2/2] meta: Remove pr-template skill --- .agents/skills/pr-template/SKILL.md | 147 ---------------------------- 1 file changed, 147 deletions(-) delete mode 100644 .agents/skills/pr-template/SKILL.md diff --git a/.agents/skills/pr-template/SKILL.md b/.agents/skills/pr-template/SKILL.md deleted file mode 100644 index d1deb2b203058..0000000000000 --- a/.agents/skills/pr-template/SKILL.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -name: pr-template -description: Update .github/pull_request_template.md in a Sentry SDK repository to match the canonical template. Use when asked to "update pr template", "sync pr template", "standardize pr template", or when rolling out the canonical template across SDK repos. ---- - -# PR Template Updater - -Updates `.github/pull_request_template.md` in a Sentry SDK repository using two sources of truth: - -- **[PR Template docs](https://develop.sentry.dev/sdk/getting-started/templates/pr-template/)** — defines the canonical template content -- **[`sentry-skills:create-pr`](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/create-pr/SKILL.md)** — defines how PRs are written and what structure the template must support - -**Requires**: GitHub CLI (`gh`) authenticated and available, with push access to the target repository. - -## Step 1: Read the sources of truth - -Fetch the canonical template and the pr-writer skill: - -```bash -# Canonical template (read the Template section) -curl -s https://develop.sentry.dev/sdk/getting-started/templates/pr-template.md - -# PR writer skill -curl -s https://raw.githubusercontent.com/getsentry/skills/main/plugins/sentry-skills/skills/create-pr/SKILL.md -``` - -The canonical template content is: - -```markdown -### Description - - - -### Issues - - -``` - -Linear magic words for the Issues section: - -- **Closing**: `close`, `closes`, `closed`, `closing`, `fix`, `fixes`, `fixed`, `fixing`, `resolve`, `resolves`, `resolved`, `resolving`, `complete`, `completes`, `completed`, `completing` -- **Non-closing**: `ref`, `refs`, `references`, `part of`, `related to`, `contributes to`, `toward`, `towards` - -## Step 2: Read the existing template - -```bash -cat .github/pull_request_template.md 2>/dev/null \ - || cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null \ - || echo "NO TEMPLATE" -``` - -Note any repo-specific content that must be preserved: - -- **`sentry-cli`**: Legal boilerplate clause for external contributors — keep it. -- **`sentry-go`**: `### Changelog Entry` section used by Craft release tooling — keep it. -- Any other non-standard section: flag it before removing. - -## Step 3: Write the updated template - -For most repositories, the new content is the canonical template verbatim. For repositories with preserved additions, append them after the `### Issues` block. - -Example for `sentry-cli`: - -```markdown -### Description - - - -### Issues - - - -### Legal Boilerplate - -Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. -``` - -## Step 4: Create a branch and commit - -```bash -git checkout -b /meta/standardize-pr-template - -git add .github/pull_request_template.md -git commit -m "meta: Standardize PR template - -Align .github/pull_request_template.md with the canonical Sentry SDK -template at https://develop.sentry.dev/sdk/getting-started/templates/pr-template/. - -Removes checklist sections and 'How did you test it?' prompts that -contradict the code submission standards." -``` - -## Step 5: Open a draft PR - -```bash -gh pr create --draft \ - --title "meta: Standardize PR template" \ - --body "$(cat <<'EOF' -### Description - -Aligns `.github/pull_request_template.md` with the canonical Sentry SDK template. - -Removes sections that contradict the [code submission standards](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/): checklist checkboxes, 'How did you test it?' prompts, and type-of-change radio buttons. - -### Issues - -* Refs https://develop.sentry.dev/sdk/getting-started/templates/pr-template/ - -🤖 Generated with [Claude Code](https://claude.com/claude-code) -EOF -)" -``` - -## Batch Rollout - -To update multiple repos at once, run this skill in parallel agents — one per repository. Target repositories where the current template conflicts with the standards: - -| Repo | Issue | -|------|-------| -| `getsentry/sentry-java` | "How did you test it?" + checklist | -| `getsentry/sentry-cocoa` | "How did you test it?" + checklist | -| `getsentry/sentry-dart` | "How did you test it?" + checklist | -| `getsentry/sentry-kotlin-multiplatform` | "How did you test it?" + checklist | -| `getsentry/sentry-react-native` | "How did you test it?" + checklist + type-of-change | -| `getsentry/sentry-javascript` | Checkbox list | -| `getsentry/sentry-ruby` | Prose instruction list | -| `getsentry/sentry-dotnet` | No template exists — create it | - -Repositories `sentry-python`, `sentry-symfony`, `sentry-rust`, `sentry-php`, `sentry-laravel`, and `sentry-elixir` already match the canonical template and need no changes. - -## References - -- [PR Template](https://develop.sentry.dev/sdk/getting-started/templates/pr-template/) -- [Code Submission Standards](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/) -- [PR Writer Skill](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/create-pr/SKILL.md)