Repository navigation
[0.81] Title release PRs with a rocket prefix, add the release label, and detect releases by commit marker - #16558
Merged
Vladimir Morozov (vmoroz) merged 3 commits intoNov 1, 2026
Conversation
The prepare-release bot now titles release PRs '🚀 [<branch alias>]: Release N packages' (alias drops one trailing '-stable') and adds the 'release' label on create and refresh without touching other labels. The commit subject still starts with 'RELEASE:'. Dry run prints the title and label. --bump-only is unchanged. Adds unit tests for the package using the built-in Node.js test runner (node:test), with no new dependencies. (cherry picked from commit e5412d4) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The prepare-release bot now adds a release-branch marker line to the body of its RELEASE: commit. CI reads the full commit message of the built commit with the new .ado/scripts/detectReleaseBuild.js: a single well-formed marker that names the built branch makes it a release build; a malformed, duplicate, or mismatched marker fails Setup in auto mode. Commits without a marker still use the RELEASE: first-line rule. PR builds keep the prepare-release/ branch rule, and the isReleaseBuild parameter still forces either scenario. The source tag step now also requires IsReleaseBuild=True and a release commit, so forcing a developer build no longer tags. The release pipeline is unchanged. Adds node:test coverage for the detector and wires it into the root test script. (cherry picked from commit 5b2afbf) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the release automation backport.
No open issues 🎉
What changed in this PR
Backports the release automation updates from #16551 to 0.81-stable, making release PRs easier to identify and preserving release detection when squash merges use the new PR title.
Changes:
- Adds rocket-prefixed release PR titles, the
releaselabel, and branch markers in release commits. - Detects releases from full commit messages with legacy fallback, and requires both release-build and release-commit status before tagging.
- Adds automated tests, test commands, and updated pipeline documentation.
| File | Description |
|---|---|
packages/@rnw-scripts/prepare-release/src/test/prepareRelease.test.ts |
Tests titles, commit markers, bot flows, and CLI behavior. |
packages/@rnw-scripts/prepare-release/src/test/github.test.ts |
Tests label arguments and temporary-file cleanup. |
packages/@rnw-scripts/prepare-release/src/prepareRelease.ts |
Formats titles, adds commit markers, and exports main(). |
packages/@rnw-scripts/prepare-release/src/github.ts |
Adds the release label on PR creation and refresh. |
packages/@rnw-scripts/prepare-release/package.json |
Adds the prepare-release test command. |
packages/@rnw-scripts/prepare-release/bin.js |
Invokes exported main() and handles rejection. |
package.json |
Runs detector tests before workspace tests. |
docs/build-pipelines.md |
Documents marker detection, overrides, and tagging conditions. |
.ado/tests/detect-release-build.test.cjs |
Tests detection rules, CLI outputs, and pipeline wiring. |
.ado/scripts/detectReleaseBuild.js |
Implements marker validation, legacy fallback, and build overrides. |
.ado/build-template.yml |
Integrates the detector and tightens source-tagging conditions. |
Review effort: Balanced
- Read the `RNW-Release-Branch` marker only from the commit body, so a commit whose subject is the marker line is not treated as a release. - Test that a rerun refreshes a PR that GitHub created before `gh` failed, instead of creating a second one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Khalef Hosany (Khalef1)
approved these changes
Nov 1, 2026
Vladimir Morozov (vmoroz)
merged commit Nov 1, 2026
546a259
into
microsoft:0.81-stable
36 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Why
Backport of #16551 to 0.81-stable. The prepare-release bot runs the code from the
branch it was triggered on, so 0.81 release PRs get the new title and label only once
this code is on 0.81-stable. The release detection change has to come with it:
otherwise a release PR merged with more than one commit would get the new title as its
commit subject and build as a developer build.
What
Release PR title and label
🚀 [0.81]: Release N packagesand get thereleaselabel on create and on every refresh; other labels are kept.
Release detection
RELEASE:subject and adds the body lineRNW-Release-Branch: 0.81-stable. CI reads the full commit message, so the releaseis still found when GitHub uses the PR title for the merged commit. Commits without
the marker use the old
RELEASE:rule.isReleaseBuild=falsenever tags. The release pipeline is unchanged.Tests
yarn testruns thedetector tests.
Screenshots
Not applicable.
Testing
The bot ran this code against 0.81-stable and updated #16545 with the new title, label
and commit marker. CI detection was tested live for #16551.
Changelog
Should this change be included in the release notes: no
Release PRs on 0.81-stable are titled
🚀 [0.81]: Release N packagesand labeledrelease; CI detects releases by a commit-body marker.Microsoft Reviewers: Open in CodeFlow