Repository navigation
A release pull request takes release-hold while it is finished (issue btclib-org/ai-agents-process#403) #2266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6d50223
2f89649
cacd88d
6ee63c3
1294671
6f634f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -480,6 +480,59 @@ request, next to `deps-latest`'s own result. | |
| pull request that never mentions it reads exactly like one that skipped | ||
| it. | ||
|
|
||
| 1. Hold the repository's other merges until the release is published, so | ||
| that `main` does not move under the release between its gates and its | ||
| tag. Put `release-hold` on the release pull request: | ||
|
|
||
| ```shell | ||
| pr=<the release pull request's number> | ||
| ``` | ||
|
|
||
| ```shell | ||
| gh pr edit "${pr:?}" --add-label release-hold | ||
| ``` | ||
|
|
||
| While a pull request carries the label, nobody merges another pull | ||
| request into `main` here. A red `main`'s repair is the exception: it | ||
| goes first, as `CONTRIBUTING.md`'s *Landing it* says. A release pull | ||
| request waits only while a lower-numbered pull request carries the | ||
| label, so that releases go out oldest first instead of each waiting on | ||
| the others. | ||
|
Comment on lines
+498
to
+500
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep a merged release’s hold ahead of later arrivals. Release
|
||
|
|
||
| A pull request can merge between the version step and the label. So | ||
| once the label is on, fetch, and check that `origin/main` is still the | ||
| branch's base: | ||
|
|
||
| ```shell | ||
| git fetch origin | ||
| ``` | ||
|
|
||
| ```shell | ||
| git merge-base --is-ancestor origin/main HEAD | ||
| ``` | ||
|
|
||
| After a fetch that succeeded, where `merge-base` exits 1, `main` has | ||
| moved, and the branch is redone on it as the version step says, before | ||
| the gates. Any other non-zero exit, of either command, is an error to | ||
| read, not an answer. | ||
|
|
||
| An older release or a red `main`'s repair can still move `main` during | ||
| the hold. So both commands run again just before the merge, and where | ||
| `main` has moved, the branch is redone as the version step says, which | ||
| gates it again. | ||
|
|
||
| Remove the label once `release.yml`'s run on the tag has published the | ||
| release, or once the release is abandoned and its pull request closed: | ||
|
|
||
| ```shell | ||
| gh pr edit "${pr:?}" --remove-label release-hold | ||
| ``` | ||
|
|
||
| A label left behind on a release already published or abandoned holds | ||
| every merge here. Whoever finds one checks that the release is out or | ||
| its pull request closed, tells the maintainer, and removes the label on | ||
| his word. | ||
|
|
||
| 1. Run `uv run pre-commit run --all-files` and `uv run pytest --cov` | ||
| before pressing anything, then verify the Read the Docs build renders, | ||
| on `https://app.readthedocs.org/projects/<rtd>/builds/`. Read the | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking: When an approver lands an ordinary pull request during this window, the repository's actual landing procedure in
CONTRIBUTING.md:218-250sends them directly togh pr mergewithout checking labels on other pull requests, and a target-treegit grep release-hold 9f450a0finds the hold only in the label definition, README, and this release-only procedure. Because a GitHub label does not itself block merges, such an approver can follow the canonical instructions exactly and movemain, defeating the hold and allowing unreviewed changes into the release snapshot; add the hold check to the procedure every landing follows or enforce it in repository rules.AGENTS.md reference: AGENTS.md:L3-L4
Useful? React with 👍 / 👎.