Repository navigation
docs: action runtime dispatch and version PR lifecycle - #13
Conversation
Add engineering notes for the index.ts state machine, pre-mode filtering, empty-changeset skip, version PR body limits, publish stdout detection, and verified cwd wiring after changesets#486. Co-authored-by: Mohamed <garlobrian52@users.noreply.github.com>
|
PR author is not in the allowed authors list. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ac003952-9357-40e7-b58f-2763f2f6e180) |
There was a problem hiding this comment.
Pull request overview
Adds a new engineering-focused runtime guide for @changesets/action to clarify the action’s dispatch decisions (no-op vs version PR vs publish), and cross-links it from existing docs so maintainers can quickly answer “why did the action exit / open a PR / publish?” without re-reading src/index.ts / src/run.ts.
Changes:
- Adds
docs/action-runtime.mddocumenting startup order, dispatch state machine, version PR lifecycle (including PR listing beforepushChanges), and publish detection viaNew tag:stdout parsing. - Cross-links the new runtime doc from
docs/auth-and-publishing.mdanddocs/push-changes-internals.md. - Expands
docs/push-changes-internals.mdcall-site notes to mention the “fetch existing PR before push” rationale and link to the full lifecycle doc.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/action-runtime.md | New end-to-end runtime/control-flow doc for dispatch + version PR + publish detection. |
| docs/auth-and-publishing.md | Adds a cross-link to the new runtime doc for dispatch/version/publish behavior. |
| docs/push-changes-internals.md | Adds pointers to runtime doc and clarifies runVersion call-site ordering around PR listing vs pushing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 3. If `createGithubReleases` is true (default) and packages were detected: | ||
| - Push each tag via `git.pushTag`. | ||
| - `repos.createRelease` with body from that version’s changelog entry; `prerelease` when the version contains `-`. | ||
| - Missing changelog file → skip that release silently (`ENOENT`); missing entry for the version → throw. |


Summary
Documentation follow-up after PR #12 (Pages dual workflows). Covers the weakly documented Changesets Action control flow that answers “why did the action exit / open a PR / publish?”
Does not redo PR #11 (maintainer release runbook) or PR #12 (Pages enablement / dual publishers).
Docs added/updated
docs/action-runtime.md(new) — dispatch state machine, pre-mode changeset filtering, empty-changeset skip,runVersionordering (list PRs → push → create/update), PR body 60k truncation, publish stdoutNew tag:detection, and verifiedcwdwiring after fix: use latest ghcommit and fix cwd for git-cli changesets/action#486.docs/auth-and-publishing.md— cross-link to the runtime doc.docs/push-changes-internals.md— fetch-before-push call-site note + link to full version-PR lifecycle.Codepaths covered
src/index.ts— token/netrc startup, outputs, publish vs version vs no-op switchsrc/readChangesetState.ts— pre-mode filter affectinghasChangesetssrc/run.ts—runVersion/getVersionPrBody/runPublishsrc/utils.ts—getChangelogEntry/ package sort orderaction.yml— Node 24 runtime noteKnowledge gaps addressed
hasChangesets=truebut skip Version Packages PR creation.pushChanges(commitMode: github-apibranch reset).cwdchangesprocess.cwd(); after fix: use latest ghcommit and fix cwd for git-cli changesets/action#486 the entrypoint passescwdtoGit/runPublishonly — initialreadChangesetState()andrunVersiondefault toprocess.cwd().Verified against
src/index.ts,src/run.ts,src/readChangesetState.ts, andsrc/utils.ts.Summary by cubic
Adds
docs/action-runtime.md, a clear walkthrough of the@changesets/actionruntime: dispatch flow, version PR lifecycle, and publish detection.Cross-links it from
docs/auth-and-publishing.mdanddocs/push-changes-internals.md, and documents tricky cases like empty changeset skip, listing PRs before push withcommitMode: github-api, PR body truncation (~60k), stdoutNew tag:detection, and verifiedcwdwiring.Written for commit 9b0c236. Summary will update on new commits.
Note
Low Risk
Documentation-only changes with no runtime or workflow behavior changes.
Overview
Adds
docs/action-runtime.md, engineering notes for@changesets/actioncontrol flow insrc/index.tsandsrc/run.ts: startup order, pre-mode changeset filtering, the publish vs version vs no-op dispatch table,runVersionstep order (including listing open PRs beforepushChanges), PR body truncation at 60k, publish detection from stdoutNew tag:lines, and outputs.docs/auth-and-publishing.mdanddocs/push-changes-internals.mdnow cross-link to that doc; the push-internals call-site section explains fetch-before-push forcommitMode: github-api(changesets#488) and points to the full version-PR lifecycle.The new doc also records verified
cwdwiring after changesets#486:GitandrunPublishget the input, but dispatchreadChangesetState()andrunVersionfrom the entrypoint still default toprocess.cwd()(READMEprocess.chdirwording is outdated).Reviewed by Cursor Bugbot for commit 9b0c236. Configure here.