Toolkit for generating PowerToys release notes from GitHub milestone PRs or commit ranges...
Generate professional PowerToys release notes by collecting merged PRs, summarizing each PR with the local CLI agent, grouping by label, and producing user-facing summaries. Stable and preview releases share the same PR metadata, attribution, grouping, and formatting rules.
All generated artifacts are placed under Generated Files/ReleaseNotes/ at the repository root (gitignored).
Generated Files/ReleaseNotes/
βββ milestone_prs.json # Raw PR data from GitHub
βββ sorted_prs.csv # Sorted PR list with Copilot summaries
βββ prs_with_milestone.csv # Milestone assignment tracking
βββ grouped_csv/ # PRs grouped by label (one CSV per label)
βββ grouped_md/ # Generated markdown summaries per label
βββ v{VERSION}-release-notes.md # Final consolidated release notes
Preview-release runs use an isolated subdirectory:
Generated Files/ReleaseNotes/preview-<buildId>/
βββ release-context.json
βββ delta-commits.json
βββ delta-prs.json
βββ removed-prs.json
βββ unattributed-commits.json
βββ MemberList.md
βββ milestone_prs.json
βββ sorted_prs.csv
βββ release-notes.md
βββ hashes.md
βββ release-manifest.json # Local audit artifact; never uploaded
βββ assets-manifest.json # Local asset inventory; never uploaded
βββ final-review.md
main and stable branch transitionsgh) installed and authenticated β The collection script uses gh pr view and gh api graphql to fetch PR metadata and co-author information. Run gh auth status to verify; if not logged in, run gh auth login first. See Step 1.0.0 for details.az login) with the azure-devops extension; access to the microsoft/Dart ADO projectFor a stable release, confirm {{ReleaseVersion}} with the user before starting.
For a preview release, do not request a version: derive it from the candidate ADO build.
| Variable | Description | Example |
|---|---|---|
{{ReleaseVersion}} |
Target release version | 0.98 |
Preview mode instead requires one ADO build URL or numeric build ID. It derives the version, source commit, branch, and previous release without asking the user.
Read the scenario index, then follow only the selected scenario:
ββββββββββββββββββββββββββββββββββ
β 1.0 Verify gh auth + MemberList β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 1.1 Collect PRs (stable range) β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 1.2 Assign Milestones β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 2.1β2.4 Label PRs (auto+human) β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 3.1 Local-agent PR summaries β
β (writes CopilotSummary) β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 3.2 (Optional) Refresh PR data β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 3.3 Group by label β
β (grouped_csv) β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 4.1 Summarize (grouped_md) β
ββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββ
β 4.2 Final notes (v{VERSION}.md) β
ββββββββββββββββββββββββββββββββββ
| Step | Action | Details |
|---|---|---|
| 1.0 | Verify prerequisites | gh auth status must pass; generate MemberList.md |
| 1.1 | Collect PRs | From previous release tag on stable branch β sorted_prs.csv |
| 1.2 | Assign Milestones | Ensure all PRs have correct milestone |
| 2.1β2.4 | Label PRs | Auto-suggest + human label low-confidence |
| 3.1β3.3 | Reviews & Grouping | Local agent summarizes each PR diff into CopilotSummary β (optional refresh) β group by label |
| 4.1β4.2 | Summaries & Final | Generate grouped summaries, then consolidate |
Do not read all steps at onceβonly read the step you are executing.
| Script | Purpose |
|---|---|
| dump-prs-since-commit.ps1 | Fetch PRs between commits/tags |
| group-prs-by-label.ps1 | Group PRs into CSVs |
| collect-or-apply-milestones.ps1 | Assign milestones |
| diff_prs.ps1 | Incremental PR diff |
| prepare-release-assets.ps1 | Download installers + symbols from an ADO build, compute SHA256, emit the "Installer Hashes" markdown table for the GitHub release page |
| get-release-build-metadata.ps1 | Resolve and validate the candidate build identity, version, channel, intent, and source commit |
| get-previous-published-release.ps1 | Select the latest published stable or preview release that predates the candidate queue time |
| get-preview-release-delta.ps1 | Calculate semantic added/removed PRs between exact release commits |
| collect-pr-metadata.ps1 | Normalize GitHub metadata for an explicit set of PR numbers |
| new-preview-release-manifest.ps1 | Create the auditable build, baseline, and semantic-delta release manifest |
| upsert-draft-preview-release.ps1 | Create or update a draft prerelease without exposing a publish operation |
| verify-draft-preview-release.ps1 | Verify draft flags, target commit, managed body, and uploaded assets |
release-manifest.json and assets-manifest.json in the local audit package; do not upload either file as a GitHub release assetInstaller Hashes section immediately after the title and short public introduction, before Highlights and all change sectionssorted_prs.csv in all outputsProduct-*, Area-*, GitHub*, *Plugin, Issue-*| Issue | Solution |
|---|---|
gh command not found |
Install GitHub CLI and add to PATH |
| No PRs returned | Verify milestone title matches exactly |
Empty CopilotSummary for many PRs |
Run Step 3.1 (local-agent summaries). Do not use mcp_github_request_copilot_review from a CLI/coding agent β the GitHub API rejects bot-initiated review requests, so the column will stay empty. |
| Many unlabeled PRs | Return to labeling step before grouping |
prepare-release-assets.ps1 fails with "Failed to acquire ADO access token" |
Run az login and ensure you have access to the microsoft/Dart ADO project |
Candidate has no release-metadata.json |
The metadata resolver uses pipeline-log fallback; ambiguous or conflicting values stop the run |
| First preview after switching branches has unexpected changes | Review removed-prs.json and unattributed-commits.json; see preview delta resolution |