Prepare a GitHub release for a milestone with proper release notes
Creates GitHub releases for milestones with categorized release notes and issue management.
/plugin marketplace add postsharp/PostSharp.Engineering.AISkills/plugin install eng@postsharp-engineering<milestone URL or number>Prepare a GitHub release for a milestone. Requires user approval before execution.
$ARGUMENTS - Milestone URL or number (e.g., https://github.com/metalama/Metalama/milestone/31 or 31)
Gather all information first:
Fetch milestone details:
gh api repos/metalama/Metalama/milestones/<NUMBER> --jq '{title, state, open_issues, closed_issues}'
List all issues (open and closed):
gh issue list --repo metalama/Metalama --milestone "<TITLE>" --state all --json number,title,state,labels
Check project status for each issue:
gh api graphql -f query='{ repository(owner: "metalama", name: "Metalama") { issue(number: <NUMBER>) { projectItems(first: 10) { nodes { id project { title } fieldValues(first: 10) { nodes { ... on ProjectV2ItemFieldSingleSelectValue { name field { ... on ProjectV2SingleSelectField { name } } } } } } } } } }'
Check branch status:
develop/YYYY.N with release/YYYY.NCheck upstream version lines (e.g., 2025.1 merged into 2026.0):
# Latest releases per version line
git tag -l "release/2025.1.*" --sort=-v:refname | head -1
git tag -l "release/2026.0.*" --sort=-v:refname | head -1
# Check ancestry
git merge-base --is-ancestor release/<UPSTREAM> <TARGET_COMMIT>
git merge-base --is-ancestor release/<UPSTREAM> release/<PREV_VERSION>
Present to user for approval:
Milestone status: Open/closed issues, blockers
Issues: Categorized as Breaking/New/Enhancements/Fixes
Branch status: Sync state, version bump
Project status: Flag issues not in "Merged" or "Done"
Proposed release notes:
Single base:
Metalama <VERSION> is based on [<PREV>](https://github.com/metalama/Metalama/releases/tag/release/<PREV>), plus the following changes.
Multiple bases (upstream merged):
Metalama <VERSION> is based on [<PREV_SAME_LINE>](...) and [<UPSTREAM>](...), plus the following changes.
Then:
### Breaking Changes
- [#XXXX](https://github.com/metalama/Metalama/issues/XXXX) Description
### New
- [#XXXX](https://github.com/metalama/Metalama/issues/XXXX) Description
### Enhancements
- [#XXXX](https://github.com/metalama/Metalama/issues/XXXX) Description
### Fixes
- [#XXXX](https://github.com/metalama/Metalama/issues/XXXX) Description
### Resources
- [Milestone](https://github.com/metalama/Metalama/milestone/<NUMBER>?closed=1)
- **Full Changelog**: [release/<PREV>...release/<VERSION>](https://github.com/metalama/Metalama/compare/release/<PREV>...release/<VERSION>)
STOP and wait for user approval.
After approval:
Create release:
gh release create release/<VERSION> --target <COMMIT> --title "Metalama <VERSION>" --notes "<NOTES>"
Close milestone:
gh api repos/metalama/Metalama/milestones/<NUMBER> -X PATCH -f state=closed
Update project status to "Done" for each issue:
# Done option: 98236657
gh api graphql -f query='mutation { updateProjectV2ItemFieldValue(input: { projectId: "PVT_kwDOC7gkgc4A030b" itemId: "<ITEM_ID>" fieldId: "PVTSSF_lADOC7gkgc4A030bzgqb1vQ" value: { singleSelectOptionId: "98236657" } }) { projectV2Item { id } } }'
Add release comment to each issue:
gh issue comment <NUMBER> --repo metalama/Metalama --body "Released in [<VERSION>](https://github.com/metalama/Metalama/releases/tag/release/<VERSION>).
— Claude"
breaking → Breaking, enhancement → New/Enhancements, bug → Fixes[#1247](https://github.com/metalama/Metalama/issues/1247)— Claude