|
| 1 | +--- |
| 2 | +name: release-notes |
| 3 | +description: "Generate release notes for a Plane release PR in `makeplane/plane` (semver, e.g. `release: vX.Y.Z`). Reads PR commits, filters out noise, categorizes by conventional-commit type, optionally enriches via Plane MCP, and writes the result as the PR description." |
| 4 | +user_invocable: true |
| 5 | +--- |
| 6 | + |
| 7 | +# Release Notes Generator |
| 8 | + |
| 9 | +Generate structured release notes from a Plane release PR by parsing its commit list, then update the PR description. |
| 10 | + |
| 11 | +## Versioning |
| 12 | + |
| 13 | +Plane community uses **semver** (`vX.Y.Z`, major.minor.patch) for releases. |
| 14 | + |
| 15 | +- PR title format: `release: vX.Y.Z` |
| 16 | +- Source branch: `canary` |
| 17 | +- Target branch: `master` |
| 18 | + |
| 19 | +## When to Use |
| 20 | + |
| 21 | +- User links/mentions a Plane release PR (e.g. `release: v1.3.0`) and asks for release notes |
| 22 | +- User asks to "create release notes" / "update PR description" for a release PR in `makeplane/plane` |
| 23 | +- The branch is named `canary` or `release/x.y.z` and the base is `master` |
| 24 | + |
| 25 | +## Steps |
| 26 | + |
| 27 | +### 1. Fetch commits |
| 28 | + |
| 29 | +```bash |
| 30 | +gh pr view <PR_NUM> --json title,body,baseRefName,headRefName,commits \ |
| 31 | + --jq '.commits[] | .messageHeadline + "\n---BODY---\n" + .messageBody + "\n===END==="' |
| 32 | +``` |
| 33 | + |
| 34 | +For a quick scan first: |
| 35 | + |
| 36 | +```bash |
| 37 | +gh pr view <PR_NUM> --json commits \ |
| 38 | + --jq '.commits[] | {oid: .oid[0:10], message: .messageHeadline}' |
| 39 | +``` |
| 40 | + |
| 41 | +### 2. Filter out noise |
| 42 | + |
| 43 | +**Always exclude** these commits — mechanical, not user-facing: |
| 44 | + |
| 45 | +| Pattern | Reason | |
| 46 | +| -------------------------------------------- | -------------- | |
| 47 | +| `fix: merge conflicts` | Merge artifact | |
| 48 | +| `Merge branch '...' of github.com:...` | Merge artifact | |
| 49 | +| `Revert "..."` (when immediately re-applied) | Internal churn | |
| 50 | + |
| 51 | +### 3. Parse work item IDs |
| 52 | + |
| 53 | +Most meaningful commits begin with a Plane work item identifier in brackets: |
| 54 | + |
| 55 | +- `[WEB-XXXX]` — web/frontend product items |
| 56 | +- `[SILO-XXXX]` — Silo (integrations: Slack, GitHub, GitLab, Jira/Linear) |
| 57 | +- `[MOBILE-XXXX]`, `[API-XXXX]`, etc. |
| 58 | + |
| 59 | +Always preserve these IDs in the release notes — they let readers click through to the source ticket. |
| 60 | + |
| 61 | +### 4. (Optional) Enrich via Plane MCP |
| 62 | + |
| 63 | +For larger features where the commit headline is terse, fetch the work item: |
| 64 | + |
| 65 | +```text |
| 66 | +mcp__plane__retrieve_work_item_by_identifier(project_identifier="WEB", issue_identifier=6874) |
| 67 | +``` |
| 68 | + |
| 69 | +Use the returned `name` and `description_stripped` to flesh out the bullet. Skip this for routine fixes — commit body is usually enough. Don't enrich every item (slow + work item descriptions are often empty). |
| 70 | + |
| 71 | +### 5. Categorize by conventional-commit type |
| 72 | + |
| 73 | +| Commit prefix | Section | |
| 74 | +| -------------------------------- | ------------------- | |
| 75 | +| `feat:`, `feat(scope):` | ✨ New Features | |
| 76 | +| `fix:`, `fix(scope):` | 🐛 Bug Fixes | |
| 77 | +| `refactor:` | 🔧 Refactor & Chore | |
| 78 | +| `chore:`, `chore(scope):` | 🔧 Refactor & Chore | |
| 79 | +| `chore(deps):`, dependabot bumps | 📦 Dependencies | |
| 80 | + |
| 81 | +### 6. Format |
| 82 | + |
| 83 | +```markdown |
| 84 | +# Release vX.Y.Z |
| 85 | + |
| 86 | +## ✨ New Features |
| 87 | + |
| 88 | +- **<Short title>** — [WEB-XXXX] (#PR_NUM) |
| 89 | + Optional 1–2 sentence elaboration drawn from commit body. |
| 90 | + |
| 91 | +## 🐛 Bug Fixes |
| 92 | + |
| 93 | +- **<Short title>** — [WEB-XXXX] (#PR_NUM) |
| 94 | + |
| 95 | +## 🔧 Refactor & Chore |
| 96 | + |
| 97 | +- **<Short title>** — [WEB-XXXX] (#PR_NUM) |
| 98 | + |
| 99 | +## 📦 Dependencies |
| 100 | + |
| 101 | +- Bump `<package>` X.Y.Z → A.B.C (#PR_NUM) |
| 102 | +``` |
| 103 | + |
| 104 | +Rules: |
| 105 | + |
| 106 | +- Lead with a bold human-readable title (rewrite the commit subject if cryptic) |
| 107 | +- Always include the work item ID in brackets and the merge PR number in parens |
| 108 | +- Add a sub-line elaboration only when the commit body has substance worth surfacing (acceptance criteria, scope notes, gotchas like "behind feature flag", "requires migration", "requires Vercel setting") |
| 109 | +- Drop empty sections |
| 110 | + |
| 111 | +### 7. Update the PR description |
| 112 | + |
| 113 | +```bash |
| 114 | +gh pr edit <PR_NUM> --body "$(cat <<'EOF' |
| 115 | +<release notes markdown> |
| 116 | +EOF |
| 117 | +)" |
| 118 | +``` |
| 119 | + |
| 120 | +Always use a HEREDOC with single-quoted `'EOF'` so backticks/dollars in the notes are preserved. |
| 121 | + |
| 122 | +## Quick Reference: end-to-end |
| 123 | + |
| 124 | +```bash |
| 125 | +PR=2498 |
| 126 | +gh pr view $PR --json commits --jq '.commits[] | .messageHeadline + "\n---\n" + .messageBody + "\n==="' > /tmp/commits.txt |
| 127 | +# read /tmp/commits.txt, filter, categorize, draft notes |
| 128 | +gh pr edit $PR --body "$(cat <<'EOF' |
| 129 | +... release notes ... |
| 130 | +EOF |
| 131 | +)" |
| 132 | +``` |
| 133 | + |
| 134 | +## Common Mistakes |
| 135 | + |
| 136 | +- **Including `fix: merge conflicts`** — merge artifact, no functional content |
| 137 | +- **Dropping the work item ID** — readers rely on `[WEB-XXXX]` to navigate to the ticket |
| 138 | +- **Over-enriching with MCP lookups** — work item descriptions are often empty; commit body is usually richer |
| 139 | +- **Missing the merge PR number** — always include `(#NNNN)` from the commit subject so reviewers can audit the source PR |
| 140 | +- **Using `--body` without HEREDOC** — backticks/dollar signs get shell-interpreted and corrupt the notes |
| 141 | +- **Editing the title** — release PR titles are version markers; only edit the body |
| 142 | + |
| 143 | +## Plane-Specific Conventions |
| 144 | + |
| 145 | +- Release PRs go from `canary` → `master` |
| 146 | +- PR title format: `release: vX.Y.Z` semver (major.minor.patch) |
| 147 | +- Commits coming from feature branches always carry a work item ID; commits without one are usually infra/chores |
0 commit comments