Repository navigation
refactor(scripts): split release-pipeline along its sections - #519
Merged
Merged
Conversation
Vivswan
force-pushed
the
ci/release-resolve-verify
branch
from
October 6, 2026 21:02
b185ed7 to
cc008ba
Compare
Vivswan
force-pushed
the
refactor/split-release-pipeline
branch
from
October 6, 2026 21:12
be33954 to
44e5db9
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The refactor preserves the command interface, updates all importers, and retains the complete 71-test census.
Review effort: Balanced
Findings: None
What changed in this PR
Splits the release pipeline into focused modules while preserving the workflow entry point and behavior introduced by #517.
Changes:
- Extracts git, tag, anchor, npm, and draft-release logic into dedicated modules.
- Moves npm tests into a separate suite and updates imports.
- Updates workflow comments and verification tests for the new paths.
| File | Description |
|---|---|
.github/scripts/release-pipeline.ts |
Retains subcommand dispatch. |
.github/scripts/release-pipeline/git.ts |
Houses shared git helpers. |
.github/scripts/release-pipeline/tags.ts |
Houses packaging and tag logic. |
.github/scripts/release-pipeline/anchor.ts |
Houses release boundary logic. |
.github/scripts/release-pipeline/npm.ts |
Houses npm publishing logic. |
.github/scripts/release-pipeline/draft.ts |
Houses draft release reads. |
.github/workflows/update-release.yml |
Updates topology documentation path. |
.github/workflows/update-release-pr.yml |
Updates implementation references. |
test/scripts/release-pipeline.test.ts |
Retains non-npm pipeline tests. |
test/scripts/release-pipeline-npm.test.ts |
Contains extracted npm tests. |
test/scripts/release-pipeline-build.test.ts |
Imports tag operations from their module. |
test/workflows/checks-workflow.test.ts |
Imports the anchor branch constant. |
test/workflows/post-green-workflow.test.ts |
Imports draft step outputs. |
test/workflows/npm-publish-workflows.test.ts |
Reads the relocated npm floor. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vivswan
force-pushed
the
ci/release-resolve-verify
branch
from
October 6, 2026 21:22
cc008ba to
58b4269
Compare
Vivswan
force-pushed
the
refactor/split-release-pipeline
branch
from
October 6, 2026 21:22
44e5db9 to
9a61ceb
Compare
release-pipeline.ts held every section of the release pipeline in one 1562-line file. Its sections move to sibling modules under .github/scripts/release-pipeline/: git.ts (the git helpers every section shares, with ancestry, a commit's position on main, and the manifest read), tags.ts (packaged commits and the refs that name them), anchor.ts (release-please's boundary), npm.ts (the pre-release version, the verdicts, the publish, the floor), and draft.ts (the draft release's source and assets). The entry file keeps its path, the one the workflows and the test fixture invoke, and holds main() alone. The test file splits the same way: its npm half becomes test/scripts/release-pipeline-npm.test.ts. Every function keeps its text; only imports, exports, and file headers are new, and every importer and comment that named the old file follows the move.
Vivswan
force-pushed
the
refactor/split-release-pipeline
branch
from
October 6, 2026 21:29
9a61ceb to
8b2175c
Compare
Vivswan
marked this pull request as ready for review
October 6, 2026 21:35
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 this changes
How
main()and the pause knob it reads.lib/holds helpers several scripts share; these sections belong to one script.Proof
test(andtest.each(call sites 71 before and after (47 + 24). Exports 37 before and after, plus 12 helpers exported for cross-module use (listed below). Lines 1563 to 1646 (script) and 2224 to 2254 (tests), the difference being headers and imports.Technical details
release-pipeline/git.ts:assertFullHistory,BOT_IDENTITY,FULL_SHA,git,gitOrNo,gitWithEnv,isAncestor,manifestVersionAt,push,resolveCommit,tryGit; fromdraft.ts:RELEASE_ASSETS(read bymain).git.tsrather thannpm.ts:tags.tsnames build tags by it, so it is shared, not npm's..github/scripts/release-pipeline.tsas where the topology lives. The entry file still exists, so the sentence stays true..github/scripts/release-pipeline.ts,.github/scripts/release-pipeline/{git,tags,anchor,npm,draft}.ts,.github/workflows/{update-release,update-release-pr}.yml(comments),test/scripts/release-pipeline{,-npm,-build}.test.ts,test/workflows/{checks-workflow,post-green-workflow,npm-publish-workflows}.test.ts.