Repository navigation
fix(release): open validated promotions as bot PRs - #2250
Conversation
Add a human-triggered promotion mode that revalidates an existing sanitized branch and opens the protected-main PR with github-actions[bot], allowing an independent maintainer approval. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 58833b4b-f8e7-42b8-bf04-9121f362f68c
🟠 Impact Analysis — PR #2250Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (1 file)
copilot-config (1 file)
root (2 files)
squad-cli (1 file)
squad-sdk (1 file)
templates (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🔒 Security Review
🔒 Security review: 1 info.
Automated security review — informational only. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 2 unresolved Copilot thread(s) — fix and resolve before merging |
| ❌ | CI passing | 9 check(s) still running |
Files Changed (8 files, +293 −11)
| File | +/− |
|---|---|
.changeset/promotion-bot-pr.md |
+6 −0 |
.copilot/skills/release-process/SKILL.md |
+23 −6 |
.github/workflows/squad-promote.yml |
+154 −0 |
.squad-templates/skills/release-process/SKILL.md |
+19 −1 |
packages/squad-cli/templates/skills/release-process/SKILL.md |
+19 −1 |
packages/squad-sdk/templates/skills/release-process/SKILL.md |
+19 −1 |
templates/skills/release-process/SKILL.md |
+19 −1 |
test/standalone-release-workflow.test.ts |
+34 −1 |
Total: +293 −11
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🟡 Changes recommended
Promotion validation gaps, sanitized-checkout CI incompatibility, and missing changelog coverage remain unresolved.
4 open issues
What changed in this PR
Adds a manually triggered mode that revalidates an existing sanitized promotion branch and opens a bot-authored PR to protected main.
Changes:
- Adds branch, release-tree, build, and test validation before PR creation.
- Preserves the legacy promotion path when no branch is supplied.
- Adds workflow assertions and updates release instructions.
| File | Description |
|---|---|
test/standalone-release-workflow.test.ts |
Adds assertions for bot-authored promotions. |
templates/skills/release-process/SKILL.md |
Documents the new promotion option. |
packages/squad-sdk/templates/skills/release-process/SKILL.md |
Updates SDK-bundled release guidance. |
packages/squad-cli/templates/skills/release-process/SKILL.md |
Updates CLI-bundled release guidance. |
.squad-templates/skills/release-process/SKILL.md |
Updates canonical release guidance. |
.github/workflows/squad-promote.yml |
Adds existing-branch validation and PR creation. |
.copilot/skills/release-process/SKILL.md |
Documents maintainer approval and merge steps. |
Review effort: Balanced
| run: npm run build | ||
|
|
||
| - name: Run release tests | ||
| run: node --test test/*.test.cjs |
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ ! "${BRANCH}" =~ ^chore/promote(-v)?-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then |
| lock_root="$(node -p 'require("./package-lock.json").version')" | ||
| lock_sdk="$(node -p 'require("./package-lock.json").packages["packages/squad-sdk"].version')" | ||
| lock_cli="$(node -p 'require("./package-lock.json").packages["packages/squad-cli"].version')" | ||
| if [ "${lock_root}" != "${version}" ] || [ "${lock_sdk}" != "${version}" ] || [ "${lock_cli}" != "${version}" ]; then |
| When a validated sanitized promotion branch already exists in the upstream | ||
| repository, a human can instead have `github-actions[bot]` open the protected | ||
| `main` PR: |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 58833b4b-f8e7-42b8-bf04-9121f362f68c
Carry the protected-main promotion PR path from github#2250 into the v1.0.2 release tree while keeping consumed changesets out of the stable branch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 58833b4b-f8e7-42b8-bf04-9121f362f68c


Summary
Add a human-triggered
promotion_branchmode tosquad-promote.yml. It revalidates an existing sanitized upstream branch and opens the protectedmainpromotion PR usinggithub-actions[bot], so a different write collaborator can supply the required approval.Why
tamirdresher_microsoftis an Enterprise Managed User and GitHub rejects external pull-request creation with HTTP 403.tamirdreshercannot be approved by the same account.GITHUB_TOKENgeneratespull_requestworkflow runs in an approval-required state; a write maintainer can approve those runs, then review and merge the bot-authored PR.Safety
The new path validates branch naming, ancestry from current
main, stripped internal paths, consumed changesets, package/lock versions, SDK dependency floors, changelog presence, build/test success, and a clean post-validation tree before opening a PR. The existing legacy path is unchanged.Validation
SKIP_BUILD_BUMP=1 npm run buildnpx vitest run test/standalone-release-workflow.test.ts --reporter=dot— 34 passedgit diff --check