chore(release): adopt changesets#426
Conversation
a6c4aae to
35d79cf
Compare
Greptile SummaryThis PR wires up Changesets as the release-note workflow for Hunk, replacing manual
Confidence Score: 4/5Safe to merge; changes are limited to CI tooling, documentation, and configuration with no modifications to source code or tests. The functional changes (workspace entry, changeset scripts, CI step) are straightforward and well-scoped. The only behavioral delta that could surprise contributors is that a code-changing PR now fails pr-validate immediately if no changeset fragment is present, which is intentional. The dot workspace addition is non-standard but is the correct pattern for changesets to version a root package. package.json (workspace dot entry) and .github/workflows/pr-ci.yml (changeset step placement and gate logic) are worth a second look. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
PR[Pull Request opened/updated] --> CHANGES[changes job\ndetect-code-changes.sh]
CHANGES -->|code_changed == false| SKIP[pr-validate skipped\nno changeset check]
CHANGES -->|code_changed == true| PRVAL[pr-validate job\nUbuntu]
CHANGES -->|code_changed == true| WIN[windows-compat job\nno changeset check]
PRVAL --> CHECKOUT[checkout with fetch-depth=0]
CHECKOUT --> INSTALL[bun install --frozen-lockfile]
INSTALL --> CS[changeset status\n--since=origin/main]
CS -->|exit 1 - no changeset| FAIL[❌ CI fails]
CS -->|exit 0 - changeset found| FMT[format:check → lint → typecheck → tests → build]
FMT --> PASS[✅ pr-validate passes]
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
.github/workflows/pr-ci.yml:113-114
**Changeset check only enforced on Ubuntu runner**
The `windows-compat` job does not include the `Verify release-note changeset` step, so a PR that fails the changeset requirement would still show a green Windows job. This is probably fine since it's a process gate rather than a platform test, but it means CI won't surface a missing changeset on the Windows run path.
### Issue 2 of 2
package.json:26-29
**Root package listed as explicit workspace member**
Adding `"."` to `workspaces` is the correct way to make `hunkdiff` discoverable by changesets when the publishable package lives at the repo root. However, this is a non-standard entry — bun's workspace resolution must handle the root being listed both as the workspace host and as a member. If a future `bun install` or `bun update` run produces unexpected peer-resolution loops or lock-file churn, this is the first place to investigate.
Reviews (1): Last reviewed commit: "chore(release): adopt changesets" | Re-trigger Greptile |
| - name: Verify release-note changeset | ||
| run: bun run changeset:status -- --since=origin/main |
There was a problem hiding this comment.
Changeset check only enforced on Ubuntu runner
The windows-compat job does not include the Verify release-note changeset step, so a PR that fails the changeset requirement would still show a green Windows job. This is probably fine since it's a process gate rather than a platform test, but it means CI won't surface a missing changeset on the Windows run path.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/pr-ci.yml
Line: 113-114
Comment:
**Changeset check only enforced on Ubuntu runner**
The `windows-compat` job does not include the `Verify release-note changeset` step, so a PR that fails the changeset requirement would still show a green Windows job. This is probably fine since it's a process gate rather than a platform test, but it means CI won't surface a missing changeset on the Windows run path.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Moved the changeset validation into its own Release-note changeset job with a full checkout, so the process gate is surfaced independently instead of being buried in the Ubuntu smoke job or duplicated in Windows.
This comment was generated by Pi using OpenAI GPT-5
| "workspaces": [ | ||
| ".", | ||
| "packages/*" | ||
| ], |
There was a problem hiding this comment.
Root package listed as explicit workspace member
Adding "." to workspaces is the correct way to make hunkdiff discoverable by changesets when the publishable package lives at the repo root. However, this is a non-standard entry — bun's workspace resolution must handle the root being listed both as the workspace host and as a member. If a future bun install or bun update run produces unexpected peer-resolution loops or lock-file churn, this is the first place to investigate.
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 26-29
Comment:
**Root package listed as explicit workspace member**
Adding `"."` to `workspaces` is the correct way to make `hunkdiff` discoverable by changesets when the publishable package lives at the repo root. However, this is a non-standard entry — bun's workspace resolution must handle the root being listed both as the workspace host and as a member. If a future `bun install` or `bun update` run produces unexpected peer-resolution loops or lock-file churn, this is the first place to investigate.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Kept the root workspace entry because Changesets needs it to discover the publishable root hunkdiff package, and added a note in .changeset/README.md documenting that it is intentional.
This comment was generated by Pi using OpenAI GPT-5
35d79cf to
f2edd00
Compare
f2edd00 to
4d5e5a5
Compare
Summary
.changeset/*.mdinstead of editingCHANGELOG.mdin normal PRs, or use an empty changeset for maintenance-only work.bun run release:versioncan generate the release section without reintroducing the sharedCHANGELOG.mdconflict point.Verification
bun run changeset:status -- --since=origin/mainbun run format:checkbun run lintbun run typecheckbun testThis PR description was generated by Pi using OpenAI GPT-5