From 30e825ef097f6825553ad2d2cca61605aadd7862 Mon Sep 17 00:00:00 2001 From: Kevin Codex Date: Fri, 13 Nov 2026 16:42:49 +0800 Subject: [PATCH] docs(release): close and reopen the release pull request so pr-guard runs On #150, the first release pull request, "Approve workflows to run" started ci and pr-title but not pr-guard: GitHub creates no pull_request_target run at all for what release-please's GITHUB_TOKEN does, so the required check never appeared and the pull request merged only through the admin bypass. The README's release steps and the workflow comment now say to close and reopen the release pull request: the reopen is the maintainer's own event, and pr-guard listens for `reopened`, so every check runs. Then approve, re-run pr-guard, and squash-merge. To be confirmed on the next release pull request. The README also asks to check, before merging, that the pull request still carries its `autorelease: pending` label: release-please finds the merged release pull request by that label. release-please 17.6.0 does not change labels on close or reopen (it only swaps pending for tagged after a release, and removes its snooze label), so this is a safeguard, not a known failure. --- .github/workflows/release-please.yml | 6 +++--- app/README.md | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index a6b0b940..30903761 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -8,9 +8,9 @@ name: release-please # It uses the job's own GITHUB_TOKEN: created for this run, gone when it ends, so there is no stored secret to protect. # Only this job gets write access: to push the release pull request's branch and publish the release (contents), to # open and update that pull request (pull requests), and to label it (issues). The token cannot push to main past the -# branch rules. GitHub holds the workflow runs of a pull request this token opens or updates until someone with write -# access clicks "Approve workflows to run" on it, so a maintainer approves the release pull request's checks before -# merging it. +# branch rules. For what this token does, GitHub creates no pr-guard run (pull_request_target) and holds the other +# checks for approval, so a maintainer closes and reopens the release pull request: that event is theirs, and every +# check runs, pr-guard included (app/README.md, Releasing). # .github/scripts/workflows.test.mjs keeps this file to exactly that. on: diff --git a/app/README.md b/app/README.md index d5c1b94f..85b5cbc5 100644 --- a/app/README.md +++ b/app/README.md @@ -50,11 +50,13 @@ version and commit. 1. After each merge, release-please keeps one pull request titled `chore: release X.Y.Z` up to date: the version in `package.json` and `package-lock.json`, and the new `CHANGELOG.md` entry. Edit the notes there if needed; they are public: no hostnames, secrets, wallet keys or unfixed vulnerabilities. -2. A maintainer approves its checks: GitHub holds the workflow runs of a pull request that release-please's token opens - or updates until someone with write access clicks **Approve workflows to run** on it. Then the maintainer approves the - pull request (pr-guard asks for an owner's approval), re-runs `pr-guard` (it reads approvals only when it runs, see - CONTRIBUTING.md), and merges once it passes. release-please tags the merge commit `vX.Y.Z` and publishes the GitHub - Release. +2. A maintainer **closes and reopens** the release pull request, right away. For what release-please's token does, + GitHub creates no `pr-guard` run at all and holds the other checks for approval (seen on #150); a reopen by a + maintainer is their own event, so every check runs, `pr-guard` included. Before merging, check that the pull request + still carries its `autorelease: pending` label (release-please finds the merged release pull request by it; add it back + if it is missing). Then the maintainer approves the pull request (pr-guard asks for an owner's approval), re-runs + `pr-guard` (it reads approvals only when it runs, see CONTRIBUTING.md), and squash-merges it once it passes. + release-please tags the merge commit `vX.Y.Z` and publishes the GitHub Release. 3. Deploy, by hand, from an up-to-date `main` (`git pull`), at the repository root: `app/scripts/deploy.sh --dry-run`, then `app/scripts/deploy.sh`, both through the maintainers' checker below. `deploy.sh` refuses anything but a clean `main` equal to `origin/main` whose tag is on GitHub and whose release is published; it takes the contract addresses