Skip to content

Commit 4227c3e

Browse files
cliffhallclaude
andcommitted
docs(release): link the Prepare Python Release PR with addCloseIssueReferences
Step 2c of the release skill now links the workflow-opened PR to the release issue and reads the link back (the pr-flow step 6 recipe), and says the by-hand fallback does the same. RELEASING.md says so next to the Version Packages sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
1 parent 2016f16 commit 4227c3e

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎.claude/skills/release/SKILL.md‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,25 @@ gh workflow run prepare-python-release.yml --repo modelcontextprotocol/servers \
256256
It opens a PR that starts with `Closes #N`, on a branch named
257257
`v2/chore/<N>-python-calver-<date>`, labeled `v2`, and dispatches the
258258
TypeScript, Python and DCO workflows on that branch, as the Version Packages
259-
workflow does (not the Everything diff, whose paths it never touches). Wait
260-
for its three `(dispatched)` statuses to pass, check that each stamped package really
261-
changed, and a maintainer merges it.
259+
workflow does (not the Everything diff, whose paths it never touches).
262260
No PR means no Python server has a shipped change since its last stamp.
263261

262+
Then, on the PR:
263+
264+
1. **Link it to the release issue.** Its `Closes #N` is only a
265+
cross-reference on `v2/main`, and the workflow makes no API call, so link
266+
it with the `addCloseIssueReferences` mutation from `/pr-flow` (step 6)
267+
and read it back: `closingIssuesReferences` must list `#N`. On `v2/main`
268+
it closes nothing at merge. Find the PR by its branch:
269+
270+
```sh
271+
gh pr list --repo modelcontextprotocol/servers --base v2/main \
272+
--json number,headRefName,url \
273+
| jq --arg p "v2/chore/$N-python-calver-" '.[] | select(.headRefName | startswith($p))'
274+
```
275+
2. **Wait for its three `(dispatched)` statuses to pass**, check that each
276+
stamped package really changed, and a maintainer merges it.
277+
264278
⚠️ GitHub only dispatches a workflow that exists on the default branch. Until
265279
the first milestone merge carries this one to `main`, do it by hand, which is
266280
the same script:
@@ -274,7 +288,9 @@ node scripts/prepare-python-release.mjs # prints "name: old -> new" per stam
274288
git commit -s -am "chore: stamp Python CalVer versions for $(date -u +%Y.%-m.%-d)"
275289
```
276290

277-
then open the PR through `/pr-flow`, body starting `Closes #N`.
291+
then open the PR through `/pr-flow`, body starting `Closes #N`. Its step 6
292+
links the PR to the release issue and reads the link back, as step 1 above
293+
does for the workflow's PR: do not skip it.
278294

279295
## 3. The merge PR: `v2/main` → `main`
280296

‎RELEASING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ node scripts/prepare-python-release.mjs # prints one "name: old -> new" line
3939
### PRs opened by these workflows
4040

4141
> [!NOTE]
42-
> Both workflows push their PR's branch with the workflow token, and a push made with that token starts no workflow, so each one then dispatches the TypeScript, Python and DCO workflows on that branch, and Version Packages the Everything diff too (`workflow_dispatch` is the one event the token can start; the Python stamps touch nothing the diff runs on). A PR does not list dispatched checks, so each dispatched run also reports itself on the PR's head commit as a status: `TypeScript (dispatched)`, `Python (dispatched)` and `DCO (dispatched)`, plus `Everything diff (dispatched)` on Version Packages; wait for them to pass before merging. Closing and reopening the PR does not start the CI workflows: that fires `pull_request`, and those run on `push`. The token's `pull_request` events do not run DCO or the diff either: GitHub holds those runs as `action_required` (#5173), so the PR may also list them as pending or failed with no jobs; the `(dispatched)` statuses are the results. To run one again by hand: `gh workflow run typescript.yml --ref <branch>` (or `python.yml`, `dco.yml`, `everything-mcp-diff.yml`). The Version Packages PR's body is rewritten on every push to `v2/main`, so it is linked to the release issue with `addCloseIssueReferences` (which lives outside the body), carries a `Part of #N` comment as its textual record, and gets `Part of #N` as its body's first line only immediately before it is merged. The repository setting **Settings → Actions → General → Allow GitHub Actions to create and approve pull requests** must be on, or the workflows fail at the step that opens the PR.
42+
> Both workflows push their PR's branch with the workflow token, and a push made with that token starts no workflow, so each one then dispatches the TypeScript, Python and DCO workflows on that branch, and Version Packages the Everything diff too (`workflow_dispatch` is the one event the token can start; the Python stamps touch nothing the diff runs on). A PR does not list dispatched checks, so each dispatched run also reports itself on the PR's head commit as a status: `TypeScript (dispatched)`, `Python (dispatched)` and `DCO (dispatched)`, plus `Everything diff (dispatched)` on Version Packages; wait for them to pass before merging. Closing and reopening the PR does not start the CI workflows: that fires `pull_request`, and those run on `push`. The token's `pull_request` events do not run DCO or the diff either: GitHub holds those runs as `action_required` (#5173), so the PR may also list them as pending or failed with no jobs; the `(dispatched)` statuses are the results. To run one again by hand: `gh workflow run typescript.yml --ref <branch>` (or `python.yml`, `dco.yml`, `everything-mcp-diff.yml`). The Version Packages PR's body is rewritten on every push to `v2/main`, so it is linked to the release issue with `addCloseIssueReferences` (which lives outside the body), carries a `Part of #N` comment as its textual record, and gets `Part of #N` as its body's first line only immediately before it is merged. The Prepare Python Release PR keeps its `Closes #N` line and is linked to the release issue with `addCloseIssueReferences` too, as every PR into `v2/main` is. The repository setting **Settings → Actions → General → Allow GitHub Actions to create and approve pull requests** must be on, or the workflows fail at the step that opens the PR.
4343
4444
## How publishing works
4545

@@ -78,7 +78,7 @@ A release ships one **milestone**. The step-by-step procedure, with its commands
7878
2. **Preparation PRs land on `v2/main`**, each starting with `Closes #<release issue>`:
7979
- the **audit** (`npm audit`, and `pip-audit` over each Python server's locked requirements): the report goes on the release issue, and any fix it forces is its own commit in a PR;
8080
- the **Version Packages** PR (TypeScript), which is linked to the release issue with `addCloseIssueReferences` and a `Part of #N` comment, and gets `Part of #N` as its body's first line just before merging, because the changesets action rewrites its body on every push;
81-
- the **Prepare Python Release** PR (Python).
81+
- the **Prepare Python Release** PR (Python), which keeps its `Closes #N` line and is also linked to the release issue with `addCloseIssueReferences`, since on `v2/main` a closing keyword is only a cross-reference.
8282

8383
A milestone that touches both languages and needs an audit fix has all three. They are merged before the next step starts.
8484
3. **The merge PR** takes `v2/main` into `main`. It is a pure merge: its branch is `origin/v2/main` with no commits of its own, and the merged tree equals `origin/v2/main`'s. Its body starts with `Part of #<release issue>`, not `Closes`, because `main` is the default branch and a closing keyword there would close the issue before anything is published. It is merged with a merge commit, never squashed.

0 commit comments

Comments
 (0)