Repository navigation
chore: fix the forcing-a-version guide and warn on docs impact before push - #1330
Merged
Merged
Conversation
The guide called a Release-As line in the PR description useless. Only a plain footer is; the override block works whatever merges the PR. Add the recovery for a PR merged without it, as done for #1328.
#1325 skipped the documented pre-push run and CI failed. The hook runs docs-impact.mjs once per branch push against the merge base with origin/main and only warns, since the PR body that can waive a finding may not exist yet.
The recovery looked only at main's release PR. Read the merged PR's base branch and find that branch's pending release PR, as the workflow does.
…the commit The squash commit for #1328 still holds only its subject. The guide and CONTRIBUTING.md implied the block rewrote the git commit message.
…branch The fixture now has upstream past the merge base and HEAD on a branch other than the one pushed, and the two-branch case asserts which branch is checked.
gh run rerun returns before the run updates the release PR, so the title check read the old version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The maintainer merged #1328 with the web button, so the documented
gh pr merge --body "Release-As: …"never ran and the release PR stayed at 1.2.0. Adding release-please's commit-override block to #1328's description and re-running Release moved #1320 to 1.1.2. The guide said aRelease-Asline in the PR description does nothing. That holds only for a plain footer.Docs:
docs/releasing.md. The override block, written in the PR description when the PR is opened, is now the main method. It works whatever merges the PR.gh pr merge --bodyremains the other option. The guide still warns that the block replaces the whole message release-please parses, so it starts with the full conventional subject, and that a malformed block drops the commit. release-please does not rewrite the git commit itself.gh run watch --exit-status, then read the pending release PR for that base. This works formainand forrelease/vX.Y.x.release-please--branches--<target>--components--cluckworkbranch on every Release run that changes the release PR. It never pushesmain.CONTRIBUTING.md,.github/AGENTS.md,.github/pull_request_template.mdanddocs/decisions/351-releases.mdnow say the same.Hooks:
.github/scripts/docs-impact.mjsfor the first branch pushed, against its merge base withorigin/main. It warns and never refuses, because the PR body that can waive a finding may not exist at the first push. It skips quietly without node, the script ororigin/main. It adds about 0.23 s to a push (three runs). The check is synchronous with no timeout, so a push waits for it: an injected 1.5 s delay gave a 1,532 ms hook run, still exiting 0. feat(mcp): submit daily entries and record feed, water, purchases and expenses #1325 skipped the documented manual run and failed CI.mainnow names--no-verifyas the skip.Both hooks run only in a clone with
git config core.hooksPath .githooksset. The main-branch refusal already existed (#1172). It did not stopfdd750acbecause hooks were off in that clone at the time. The maintainer has since setcore.hooksPath .githooksthere and updated the checkout toorigin/main(both verified: HEAD andorigin/mainareeeb90cfd).How it was verified
python3 tools/agent-guard/git_hooks_test.py: 13 tests, including four newDocsImpactWarningTestcases. The fixture moves upstream past the merge base and checks out a branch other than the one pushed. Each of these hook changes turns the tests red: using theorigin/maintip instead of the merge base, usingHEADinstead of the pushed commit, checking the last branch instead of the first, and refusing on a finding.python3 tools/agent-guard/git_guard_test.py,node --test .github/scripts/docs-impact.test.mjs .github/scripts/release-line.test.mjs(29 tests), and theImagePin|SchemaDocs|Documentationapplication tests (20 tests).Not verified: whether
gh run watchsees the old completed attempt immediately aftergh run rerunand returns early. Nobody triggered a live rerun to observe it.