Skip to content

node-simple-pnpm: publish without the stable channel when the merged PR is labelled mark-unstable - #225

Merged
PaulNewling merged 1 commit into
v4-betafrom
feat/mark-unstable-label
Oct 27, 2026
Merged

PaulNewling merged 1 commit into
v4-betafrom
feat/mark-unstable-label

Conversation

@PaulNewling

Copy link
Copy Markdown
Contributor

A block PR labelled mark-unstable now publishes the block without adding it to the stable channel. PRs without the label release as before.

How it works

node-simple-pnpm.yaml, job build-test-publish. A release takes two runs on main, and each side is one check:

  1. Run on the PR's merge commit ("Commit changed files to main"): looks up the PR for GITHUB_SHA (GET /repos/{repo}/commits/{sha}/pulls). If it has mark-unstable, the "Auto-generated changes" commit gets a Publish-Unstable: true trailer.
  2. Publish run on that commit (new step before "Pack unpublished npm packages"): if the trailer is present, sets PL_PUBLISH_UNSTABLE=true and adds a run notice. block-tools publish reads that variable as --unstable.

The variable is set only when the trailer is present. block-tools reads --unstable through commander, and commander treats any value as "on", false included.

Behaviour

  • If the PR lookup fails, the version commit is not pushed and nothing is published. The publish run itself makes no API calls.
  • Repos that don't publish blocks are unaffected: the variable means nothing outside block-tools publish. They do get one extra API call on runs that push a version commit.
  • Blocks that hardcode --unstable in prepublishOnly (mixcr-clonotyping and 4 others) stay unstable. The label can only make a release unstable, not stable.
  • mark-unstable already exists in 77 of the 78 block repos. import-bulk-count-matrix still needs it, from someone with write access.

Known gap

When two PRs merge close together, the first PR's version push is rejected and its run fails. The second PR's run then releases both, and only the second PR's label is checked. If that happens, block-tools mark-stable --unmark removes the block from the stable channel.

Before promoting to v4

  • Canary on one block: merge a labelled PR and check that the trailer appears and the version is not in the stable channel.
  • Confirm the commit→PR lookup works for merge-queue merges. It hasn't been verified yet.

@PaulNewling
PaulNewling marked this pull request as ready for review October 27, 2026 10:24
@PaulNewling
PaulNewling merged commit c510def into v4-beta Oct 27, 2026
1 check passed
@PaulNewling
PaulNewling deleted the feat/mark-unstable-label branch October 28, 2026 08:53
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.

1 participant