Repository navigation
feat: update-readme GitHub Action (#28, 2/2) - #58
Merged
Merged
Conversation
|
The changes in this PR will be included in the next version bump.
|
adrianbrowning
added a commit
that referenced
this pull request
Oct 8, 2026
* feat: extract --check and the check-sync GitHub Action (#28) * feat: extract --check and the check-sync GitHub Action (#28) * fix(extract): --check compares whole files as bytes * fix(extract): --force refuses a whole-file target that is not valid UTF-8 * feat: update-readme GitHub Action (#28) (#58)
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.


Closes #28. Stacked on #57 (check-sync); review and merge that first.
Summary
The second action #28 asks for: treat source files as authoritative and open, or refresh, one pull request that holds only the Markdown changes.
Decisions (agreed before starting):
gitandgh, both preinstalled on GitHub runners. No third-party actions.mdcode/update-docs). A rerun with nothing new pushes nothing and edits the existing PR instead of opening another.Safety:
branchequal tobase-branchis an error, exit 2.updatewrote, or the action refuses to push.base-branch. Staged or unrelated changes in the caller's checkout can't leak in, and a checkout that is behind still produces a PR on the tip.actions/checkoutstored. It is never written to git config.contents: writeandpull-requests: write, and explain that PRs opened withGITHUB_TOKENdon't start workflows (pass an App token or a fine-grained PAT). They also say never to run the action onpull_request_targetor on a fork's code.Evidence
update-readme-action.test.ts(8 tests) runs the script against a local bare repository, which stands in for GitHub, and a stand-inghthat records its calls:README.mdandmy docs/guide.md, with paths containing spaces.src/greet.tsis untouched, the commit's parent is main's tip, and main itself is never pushed. The caller's checkout keeps its stagednotes.txtand its HEAD. The PR body lists each block and its source.Already up to date: #1and doesn't push or open a second PR.Refreshed #1, with the new commit on main's new tip.changed=false) and only callsgh pr list.Closed #1.file=can't be read, it exits 1 with::error file=README.md,line=5,title=mdcode read_failed::…. The message names the caller's checkout, not the worktree. Nothing is pushed andghis never called.branch: mainexits 2.check-sync-action.test.ts(8 tests) still passes with check-sync's helpers moved to the shared module.pnpm checkpasses.intent maintainer check --base origin/feat/28-github-actionsshows 0 pending.Not verified: a live run against github.com.
ghwas stubbed.Merge Danger
Door: two-way
Blast Radius: consumer repos
This is a new action, and only consumers who add it run it. When it does run, it can force-push one branch it owns and open, edit or close one PR. It doesn't change the CLI.