|
| 1 | +--- |
| 2 | +name: pr-template |
| 3 | +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. |
| 4 | +--- |
| 5 | + |
| 6 | +# PR Template Updater |
| 7 | + |
| 8 | +Updates `.github/pull_request_template.md` in a Sentry SDK repository using two sources of truth: |
| 9 | + |
| 10 | +- **[PR Template docs](https://develop.sentry.dev/sdk/getting-started/templates/pr-template/)** — defines the canonical template content |
| 11 | +- **[`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 |
| 12 | + |
| 13 | +**Requires**: GitHub CLI (`gh`) authenticated and available, with push access to the target repository. |
| 14 | + |
| 15 | +## Step 1: Read the sources of truth |
| 16 | + |
| 17 | +Fetch the canonical template and the pr-writer skill: |
| 18 | + |
| 19 | +```bash |
| 20 | +# Canonical template (read the Template section) |
| 21 | +curl -s https://develop.sentry.dev/sdk/getting-started/templates/pr-template.md |
| 22 | + |
| 23 | +# PR writer skill |
| 24 | +curl -s https://raw.githubusercontent.com/getsentry/skills/main/plugins/sentry-skills/skills/create-pr/SKILL.md |
| 25 | +``` |
| 26 | + |
| 27 | +The canonical template content is: |
| 28 | + |
| 29 | +```markdown |
| 30 | +### Description |
| 31 | + |
| 32 | +<!-- Brief description of what the PR does. |
| 33 | +Why these changes are being made — the motivation. |
| 34 | +Alternative approaches considered, if any. |
| 35 | +Any additional context reviewers need. --> |
| 36 | + |
| 37 | +### Issues |
| 38 | + |
| 39 | +<!-- |
| 40 | +* Fixes #1234 |
| 41 | +* Refs LINEAR-ABC-123 |
| 42 | +--> |
| 43 | +``` |
| 44 | + |
| 45 | +Linear magic words for the Issues section: |
| 46 | + |
| 47 | +- **Closing**: `close`, `closes`, `closed`, `closing`, `fix`, `fixes`, `fixed`, `fixing`, `resolve`, `resolves`, `resolved`, `resolving`, `complete`, `completes`, `completed`, `completing` |
| 48 | +- **Non-closing**: `ref`, `refs`, `references`, `part of`, `related to`, `contributes to`, `toward`, `towards` |
| 49 | + |
| 50 | +## Step 2: Read the existing template |
| 51 | + |
| 52 | +```bash |
| 53 | +cat .github/pull_request_template.md 2>/dev/null \ |
| 54 | + || cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null \ |
| 55 | + || echo "NO TEMPLATE" |
| 56 | +``` |
| 57 | + |
| 58 | +Note any repo-specific content that must be preserved: |
| 59 | + |
| 60 | +- **`sentry-cli`**: Legal boilerplate clause for external contributors — keep it. |
| 61 | +- **`sentry-go`**: `### Changelog Entry` section used by Craft release tooling — keep it. |
| 62 | +- Any other non-standard section: flag it before removing. |
| 63 | + |
| 64 | +## Step 3: Write the updated template |
| 65 | + |
| 66 | +For most repositories, the new content is the canonical template verbatim. For repositories with preserved additions, append them after the `### Issues` block. |
| 67 | + |
| 68 | +Example for `sentry-cli`: |
| 69 | + |
| 70 | +```markdown |
| 71 | +### Description |
| 72 | + |
| 73 | +<!-- Brief description of what the PR does. |
| 74 | +Why these changes are being made — the motivation. |
| 75 | +Alternative approaches considered, if any. |
| 76 | +Any additional context reviewers need. --> |
| 77 | + |
| 78 | +### Issues |
| 79 | + |
| 80 | +<!-- |
| 81 | +* Fixes #1234 |
| 82 | +* Refs LINEAR-ABC-123 |
| 83 | +--> |
| 84 | + |
| 85 | +### Legal Boilerplate |
| 86 | + |
| 87 | +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. |
| 88 | +``` |
| 89 | + |
| 90 | +## Step 4: Create a branch and commit |
| 91 | + |
| 92 | +```bash |
| 93 | +git checkout -b <your-username>/meta/standardize-pr-template |
| 94 | + |
| 95 | +git add .github/pull_request_template.md |
| 96 | +git commit -m "meta: Standardize PR template |
| 97 | +
|
| 98 | +Align .github/pull_request_template.md with the canonical Sentry SDK |
| 99 | +template at https://develop.sentry.dev/sdk/getting-started/templates/pr-template/. |
| 100 | +
|
| 101 | +Removes checklist sections and 'How did you test it?' prompts that |
| 102 | +contradict the code submission standards." |
| 103 | +``` |
| 104 | + |
| 105 | +## Step 5: Open a draft PR |
| 106 | + |
| 107 | +```bash |
| 108 | +gh pr create --draft \ |
| 109 | + --title "meta: Standardize PR template" \ |
| 110 | + --body "$(cat <<'EOF' |
| 111 | +### Description |
| 112 | +
|
| 113 | +Aligns `.github/pull_request_template.md` with the canonical Sentry SDK template. |
| 114 | +
|
| 115 | +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. |
| 116 | +
|
| 117 | +### Issues |
| 118 | +
|
| 119 | +* Refs https://develop.sentry.dev/sdk/getting-started/templates/pr-template/ |
| 120 | +
|
| 121 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 122 | +EOF |
| 123 | +)" |
| 124 | +``` |
| 125 | + |
| 126 | +## Batch Rollout |
| 127 | + |
| 128 | +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: |
| 129 | + |
| 130 | +| Repo | Issue | |
| 131 | +|------|-------| |
| 132 | +| `getsentry/sentry-java` | "How did you test it?" + checklist | |
| 133 | +| `getsentry/sentry-cocoa` | "How did you test it?" + checklist | |
| 134 | +| `getsentry/sentry-dart` | "How did you test it?" + checklist | |
| 135 | +| `getsentry/sentry-kotlin-multiplatform` | "How did you test it?" + checklist | |
| 136 | +| `getsentry/sentry-react-native` | "How did you test it?" + checklist + type-of-change | |
| 137 | +| `getsentry/sentry-javascript` | Checkbox list | |
| 138 | +| `getsentry/sentry-ruby` | Prose instruction list | |
| 139 | +| `getsentry/sentry-dotnet` | No template exists — create it | |
| 140 | + |
| 141 | +Repositories `sentry-python`, `sentry-symfony`, `sentry-rust`, `sentry-php`, `sentry-laravel`, and `sentry-elixir` already match the canonical template and need no changes. |
| 142 | + |
| 143 | +## References |
| 144 | + |
| 145 | +- [PR Template](https://develop.sentry.dev/sdk/getting-started/templates/pr-template/) |
| 146 | +- [Code Submission Standards](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/) |
| 147 | +- [PR Writer Skill](https://github.com/getsentry/skills/blob/main/plugins/sentry-skills/skills/create-pr/SKILL.md) |
0 commit comments