chore: copy Plate release CI setup#292
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be9e5db6b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const contributorPattern = | ||
| /by \[@([A-Za-z0-9-]+)\]\(https:\/\/github\.com\/[^)]+\)/g; |
There was a problem hiding this comment.
Capture Changesets contributors in release notes
In this repo, Changesets changelog entries are emitted as Thanks [@zbeyens](...), but this regex only matches by [@...]. When generateRawReleaseNotes() runs for a normal package release, collectContributors() never adds those authors, so the generated GitHub Release omits the Contributors section even though the package changelog has contributors; I verified this against the existing kitcn 0.15.13 changelog shape.
Useful? React with 👍 / 👎.
| echo "Deleting caches..." | ||
| for cacheKey in $cacheKeys; do | ||
| echo "Deleting cache: $cacheKey" | ||
| gh actions-cache delete "$cacheKey" -R $REPO -B $BRANCH --confirm |
There was a problem hiding this comment.
Grant actions write before deleting caches
When this workflow runs in a repository/org with restricted default GITHUB_TOKEN permissions, this delete command calls the Actions cache delete API without permissions: actions: write; GitHub's REST docs for deleting Actions caches require Actions repository permissions (write), so closed-PR cleanup can 403 instead of clearing the caches it just listed.
Useful? React with 👍 / 👎.
| process.exit(result.status ?? 1); | ||
| } | ||
|
|
||
| return JSON.parse(result.stdout || readFileSyncUtf8(statusOutputPath)); |
There was a problem hiding this comment.
Read Changesets status from the output file
When a main push has a manual changeset, this parses result.stdout before the JSON file even though Changesets documents status --output={filePath} as writing the JSON status to that file; the CLI's normal human status output is not JSON, so a non-empty stdout report will make JSON.parse(result.stdout) throw before the release PR can be prepared. Since the command already writes .tmp/prepare-release-changesets-status.json, parse that file instead of preferring stdout.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce33d3c104
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "check": "bun run check:ci && bun run test:verify && bun run test:runtime", | ||
| "check:ci": "bun lint && bun typecheck && bun run test && bun run test:cli && bun run test:concave && bun run fixtures:check", | ||
| "ci:release": "bun run release", | ||
| "ci:version": "bun changeset version && bun install --no-frozen-lockfile", |
There was a problem hiding this comment.
Run the Changesets binary in ci:version
When the release workflow reaches changesets/action with version: bun run ci:version, this script executes bun changeset version; Bun treats changeset as a Bun script/subcommand, not a package binary. I checked bun changeset --help in this repo and it exits with error: Script not found "changeset", so version PR creation fails before bun install; invoke the Changesets binary directly from the script PATH or via bunx instead.
Useful? React with 👍 / 👎.
| ); | ||
| const packageJsonPath = new URL('../../package.json', import.meta.url); | ||
|
|
||
| test('release workflow uses the copied GitHub Release path', async () => { |
There was a problem hiding this comment.
Wire release tooling tests into CI
These new workflow/release tests live under tooling/scripts, but the repo's Bun test config scopes default bun test to ./packages, and check:ci only runs that default test command. As a result the release workflow assertions are skipped in normal CI and can only fail when someone remembers the targeted command; move them under the configured test root or add an explicit CI script for the tooling tests.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0d732532a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pull_request: | ||
| types: [closed] |
There was a problem hiding this comment.
Run fork PR cleanup from the base context
When this workflow is triggered by a closed PR from a fork, pull_request runs with a read-only GITHUB_TOKEN, so the later cache delete call still cannot remove Actions caches even if the workflow requests actions: write. Since this cleanup does not need to execute PR code, use pull_request_target or explicitly skip fork PRs; otherwise fork PR caches remain after close.
Useful? React with 👍 / 👎.
🐛 Fixes ➖ N/A
🟢 95-100% confidence
bun check; focused release helper tests; autoreview clean✅ Outcome
tooling/scripts/auto-release-pr.mjsand updated workflows to use it.## ContributorsandFull changelogrelease-note footers.sync-version-package-releases.*; it is tied to Plate's release-index/template sync system, which KitCN does not have.NPM_TOKEN, Claude token, optional release app credentials), which local checks cannot prove.🏗️ Design
🧪 Verified
bun lint:fixbun test ./tooling/scripts/auto-release-pr.test.ts ./tooling/scripts/prepare-release-changesets.test.ts ./tooling/scripts/published-package-tags.test.ts ./tooling/scripts/release-notes.test.ts ./tooling/scripts/release-workflow.test.ts.agents/skills/autoreview/scripts/autoreview --mode localbun checkpassed after rerunning one unrelated package-intent timeout successfully