Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 8.25 KB

standing-pr-body.md

File metadata and controls

62 lines (38 loc) · 8.25 KB

The standing-PR body is an interface

In standing-PR mode, releasekit keeps one open pull request describing the next release. Parts of its body are read back by the bot and decide what ships, so reflowing the markdown or stripping HTML comments can change the release without looking wrong in review. This page lists those parts, what an edit to each does, and what is bot-owned.

The regions

Every input in the body is delimited by an HTML comment marker. The markers are the contract. The bot never parses the surrounding prose. A checkbox is read from the - [ ], - [x] or - [X] row, indented or not, that carries the checkbox's own marker: only its [ ] / [x] / [X] counts. You can reword a row's visible label freely; you cannot move, edit, or delete its marker.

Marker What it is What an edit does
<!-- releasekit-notes:<pkg> --> … <!-- releasekit-notes-end:<pkg> --> Editable release notes, one region per releasing package, keyed by package name even when only one package releases. A sync release without packageSpecificTags has a single region, keyed by version.mainPackage, else monorepo Text inside replaces the generated release notes for that package, at publish
<!-- rk-sel:<pkg> --> A row in the Packages to release checklist Unticking asks the bot to hold that package back from the next release
<!-- rk-pre:<pkg> --> Channel toggle on a stable row Ticking asks the bot to ship that package as a prerelease
<!-- rk-grad:<pkg> --> Channel toggle on a prerelease row, or the row offering an unchanged prerelease's graduation Ticking asks the bot to graduate that package to stable
<!-- rk-grad-sync --> A sync release's graduation checkbox Ticking asks the bot to graduate the release to stable
<!-- releasekit-manifest --> The release manifest, in a comment by the bot that opened the PR Bot-owned. Drives the entire publish

The checklist rows live inside <!-- releasekit-selection --> … <!-- releasekit-selection-end -->, each of those two markers on a line of its own, and the manifest lives in its own comment rather than the body.

The bot escapes markers in text it copies into the body, such as changelog entries and release notes, so a commit message can't open, end or forge a region. In changelog entries it escapes every <!--, so none can hide the rows below.

The checklist and channel toggles

A tick or untick takes effect only when the next standing-pr update run rebuilds the PR: immediately if your workflow listens for pull_request: edited (the example does), otherwise on the next push or scheduled run. Merge only after the rebuilt body shows the change — publish reads the manifest, not the body, so merging earlier ships the previous selection. With authorization set, a run applies it only while the body's last human editor is authorized.

  • Sync releases have no checklist — they ship as one unit. On a prerelease line they get the rk-grad-sync checkbox instead.
  • A package on a prerelease line with nothing queued gets an rk-grad row of its own, with or without the toggles below. A graduate:<pkg> or release:graduate label ticks it while the label is on. See Graduation rows.
  • In the flat and granular lists, a member of a fixed or linked group can't be held back on its own; its untick is ignored and the row re-ticks.
  • With version.primaryPackages in the default streamlined mode, only primaries (and packages outside every unit) have checkboxes; unticking a primary holds back its unit, except members it shares with another selected primary.
  • The nested rk-pre / rk-grad toggles appear only with ci.standingPr.channelToggle: true. A toggle moves the package's whole group, a held-back row's toggle is ignored, and a package set to both prerelease and graduate (say, rk-pre plus a graduate: label) goes prerelease.

Editable release notes

Only present when the standing PR carries the preview-notes label (release:preview-notes by default — see ci.labels). With the label on, releasekit generates notes into the region, and the region is what lands in the GitHub Release (with the default publish.githubRelease.body: "auto"). A package's untouched notes refresh when its changelog entries, its version or the notes.releaseNotes config change. Edited notes are kept as written, and clearing a region regenerates it.

Write inside the markers. Content outside them is regenerated. Each package's notes, edits included, are capped at 8,000 characters in the region. Untouched notes that were cut are regenerated in full at publish; an edited region publishes as cut.

Edits can still be lost or bypassed:

  • Deleting a region's end marker discards its edits, with a warning, and the region is regenerated.
  • Removing the label removes the region.
  • An edit saved while an update is rewriting the body can be overwritten.

The manifest

The manifest comment carries the machine state for the merge: the computed versions, the base SHA the plan was built against, the release-branch commit it describes, the labels in force, the selection and channel choices, and hashes that tell untouched notes from edited ones. At publish it's checked against the merged source, so it can't publish anything that isn't in the merged code (see Manifest integrity under Label semantics in standing-pr mode). Once anyone but the bot edits it, it's void: standing-pr update ignores and rewrites it, and publish refuses it.

Don't edit it. To regenerate it, re-run the Standing Release PR workflow, or wait for the next push or scheduled run. Don't run standing-pr update from a local checkout to do it: the command discards uncommitted changes, commits any untracked files along with the version bumps, and force-pushes the release branch with your credentials — and outside the workflow it can leave the branch and the manifest out of step.

Who can change what

Two different rules, and the difference is worth knowing before you rely on either.

Selection, channel, and release-control labels are authorization-gated when ci.standingPr.authorization is configured. The release-control labels are the standing PR's bump:major / bump:minor / bump:patch, channel:prerelease, release:graduate, graduate:<pkg> and release:with-prerequisites labels, plus your ci.scopeLabels keys (default names shown; see ci.labels). release:preview-notes, release:immediate, release:retry and release:skip are not gated. A change from an actor without the required permission is reverted by the next update run, whatever starts it, and a comment explains why. Unless the body's last human editor is authorized, the checklist and channel toggles reset to the manifest's, so an unauthorized edit anywhere in the body also discards authorized ticks that no run has applied yet. Each release label goes back to how an authorized actor last left it. Bot and GitHub App actors always count as authorized, but a bot's edit, such as the in-progress banner, doesn't count as the body's last edit.

Release-notes prose is not gated. Anyone who can edit the PR body can change the text that ships in the GitHub Release. The publish path reads the region from the live body with no author check. That is a deliberate difference in kind — prose doesn't decide what version of what package goes to a registry — but it does mean the notes region inherits whatever your repository's write access already allows.

Neither replaces the merge gate: merging the standing PR is the publish, so a review-required ruleset on main is what protects it. See Branch rulesets.

For agents

If you are an AI agent working in a repository with an open standing release PR: don't reformat the body, don't touch any marker, and change notes, checklist rows or release labels only when asked. The full rules, as a paste-ready AGENTS.md snippet, are in Agents.