Skip to content

[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 into
microsoft:0.81-stablefrom
vmoroz:PR/0.81-release-pr-title
Nov 1, 2026
Merged

Vladimir Morozov (vmoroz) merged 3 commits into
microsoft:0.81-stablefrom
vmoroz:PR/0.81-release-pr-title

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Description

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Automation (AI changes or Github Actions to reduce effort of manual tasks)

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 PRs are titled 🚀 [0.81]: Release N packages and get the release
    label on create and on every refresh; other labels are kept.

Release detection

  • The bot's commit keeps its RELEASE: subject and adds the body line
    RNW-Release-Branch: 0.81-stable. CI reads the full commit message, so the release
    is still found when GitHub uses the PR title for the merged commit. Commits without
    the marker use the old RELEASE: rule.
  • The source tag step also requires a release commit, so forcing
    isReleaseBuild=false never tags. The release pipeline is unchanged.

Tests

  • Node's built-in test runner, with no new dependencies. Root yarn test runs the
    detector 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 packages and labeled release; CI detects releases by a commit-body marker.

Microsoft Reviewers: Open in CodeFlow

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>
Copilot AI balanced review requested due to automatic review settings November 1, 2026 00:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 release label, 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>
Copilot AI balanced review requested due to automatic review settings November 1, 2026 00:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the release-detection backport.

No open issues 🎉

Review effort: Balanced

@vmoroz
Vladimir Morozov (vmoroz) merged commit 546a259 into microsoft:0.81-stable Nov 1, 2026
36 checks passed
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/0.81-release-pr-title branch November 1, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants