feat: unified GitHub release, server change tracking, and enhanced release PR#3085
Conversation
ericallam
commented
Feb 18, 2026
- Add .server-changes/ convention for tracking server-only changes
- Create scripts/enhance-release-pr.mjs to deduplicate and categorize changeset PR body
- Create scripts/generate-github-release.mjs to format unified GitHub release body
- Change release.yml to create one unified GitHub release instead of per-package releases
- Add update-release job to patch Docker image link after images are pushed to GHCR
- Update changesets-pr.yml to trigger on .server-changes, enhance PR body, and clean up consumed files
- Document server changes in CLAUDE.md, CONTRIBUTING.md, CHANGESETS.md, and RELEASE.md
…lease PR - Add .server-changes/ convention for tracking server-only changes - Create scripts/enhance-release-pr.mjs to deduplicate and categorize changeset PR body - Create scripts/generate-github-release.mjs to format unified GitHub release body - Change release.yml to create one unified GitHub release instead of per-package releases - Add update-release job to patch Docker image link after images are pushed to GHCR - Update changesets-pr.yml to trigger on .server-changes, enhance PR body, and clean up consumed files - Document server changes in CLAUDE.md, CONTRIBUTING.md, CHANGESETS.md, and RELEASE.md
|
WalkthroughAdds a server-only changes convention with a new .server-changes/ README and updates docs (CHANGESETS.md, RELEASE.md, CONTRIBUTING.md, CLAUDE.md) to describe its usage. Updates CI workflows (.github/workflows/changesets-pr.yml and release.yml) to trigger on .server-changes/**, enhance PR titles and bodies (via a Node script), clean up non-README .server-changes files before lockfile commits, create a unified GitHub release, and update release bodies with tag-specific Docker links. Introduces two Node.js scripts: scripts/enhance-release-pr.mjs (composes enhanced PR bodies including .server-changes entries) and scripts/generate-github-release.mjs (formats GitHub release notes). Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/generate-github-release.mjs (1)
228-228:getPreviousVersionis computed twice for the sameversion.It's called in
main(Line 250) to seedgetContributors, and again insideformatRelease(Line 228) for the comparison link. Computing it once and threading the result through would be a minimal cleaner.♻️ Suggested refactor
- const contributors = getContributors(getPreviousVersion(version)); + const prevVersion = getPreviousVersion(version); + const contributors = getContributors(prevVersion); const packages = getPublishedPackages(); const body = formatRelease({ version, changesContent, contributors, packages, + prevVersion, });Then update
formatReleaseto acceptprevVersiondirectly instead of recomputing it:-function formatRelease({ version, changesContent, contributors, packages }) { +function formatRelease({ version, changesContent, contributors, packages, prevVersion }) { // ... - const prevVersion = getPreviousVersion(version);Also applies to: 250-250
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/generate-github-release.mjs` at line 228, getPreviousVersion(version) is being called twice — once in main to seed getContributors and again inside formatRelease for the comparison link; compute it once and thread the result through. Change main to compute const prevVersion = getPreviousVersion(version) and pass that prevVersion into formatRelease (and any other callers like getContributors) so formatRelease(prevVersion, version, ...) uses the supplied value instead of calling getPreviousVersion internally; update the signature of formatRelease and any call sites accordingly (referencing getPreviousVersion, main, formatRelease, getContributors, version, prevVersion).
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/generate-github-release.mjs
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-15T11:50:06.067Z
Learning: Applies to {packages,integrations}/**/* : Add a changeset when modifying any public package in `packages/*` or `integrations/*` using `pnpm run changeset:add`
📚 Learning: 2025-11-26T14:40:07.146Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 2710
File: packages/schema-to-json/package.json:0-0
Timestamp: 2025-11-26T14:40:07.146Z
Learning: Node.js 24+ has native TypeScript support and can execute .ts files directly without tsx or ts-node for scripts that use only erasable TypeScript syntax (type annotations, interfaces, etc.). The trigger.dev repository uses Node.js 24.11.1+ and scripts like updateVersion.ts can be run with `node` instead of `tsx`.
Applied to files:
scripts/generate-github-release.mjs
📚 Learning: 2025-09-03T14:35:52.384Z
Learnt from: myftija
Repo: triggerdotdev/trigger.dev PR: 2464
File: apps/webapp/app/utils/pathBuilder.ts:144-146
Timestamp: 2025-09-03T14:35:52.384Z
Learning: In the trigger.dev codebase, organization slugs are safe for URL query parameters and don't require URL encoding, as confirmed by the maintainer in apps/webapp/app/utils/pathBuilder.ts.
Applied to files:
scripts/generate-github-release.mjs
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build
Applied to files:
scripts/generate-github-release.mjs
📚 Learning: 2026-01-15T11:50:06.067Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-15T11:50:06.067Z
Learning: Applies to {packages,integrations}/**/* : Add a changeset when modifying any public package in `packages/*` or `integrations/*` using `pnpm run changeset:add`
Applied to files:
scripts/generate-github-release.mjs
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code
Applied to files:
scripts/generate-github-release.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: sdk-compat / Cloudflare Workers
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
- GitHub Check: sdk-compat / Bun Runtime
- GitHub Check: sdk-compat / Deno Runtime
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
scripts/generate-github-release.mjs (5)
100-119: Both past issues with contributor extraction are resolved.The
endsWith("@users.noreply.github.com")guard (previously too broad, flagged by CodeQL) is now correct, and thecontinueat line 109 is safe because: when!nameis the trigger and the email doesn't match the noreply regex, there is nothing meaningful to store; when the noreply email is the trigger, the regex invariably matches. Good.
153-168:getPreviousVersionmajor-version case is now correctly handled.The
else if (parts[0] > 0)branch (Line 160) addresses the previously reported defect where4.0.0would return itself unchanged, resulting in an empty git-log range and a self-referencing changelog link. Theelse { return null; }guard for0.0.0is also a nice touch.
219-223: Contributor@-prefix handling correctly addresses the previous concern.The regex
/^[A-Za-z0-9][-A-Za-z0-9]*$/guards against prefixing@on real names with spaces (e.g.,"Jane Smith"is emitted as plain text, not@Jane Smith), fully resolving the prior comment about invalid GitHub mention strings.
124-151: Theintegrations/directory does not exist in the repository. The current implementation ofgetPublishedPackages()correctly scans only thepackages/directory where packages are actually stored. No fix is needed.Likely an incorrect or invalid review comment.
68-72: The concern about theinDetailsflag is not valid. Theenhance-release-pr.mjsscript only emits a single<details>block at the very end of the PR body (wrapping the raw changeset output), not within content sections. Content extraction will not be prematurely terminated.Likely an incorrect or invalid review comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/generate-github-release.mjs`:
- Line 228: getPreviousVersion(version) is being called twice — once in main to
seed getContributors and again inside formatRelease for the comparison link;
compute it once and thread the result through. Change main to compute const
prevVersion = getPreviousVersion(version) and pass that prevVersion into
formatRelease (and any other callers like getContributors) so
formatRelease(prevVersion, version, ...) uses the supplied value instead of
calling getPreviousVersion internally; update the signature of formatRelease and
any call sites accordingly (referencing getPreviousVersion, main, formatRelease,
getContributors, version, prevVersion).
There was a problem hiding this comment.
🚩 show-release-summary still greps for '# Releases' heading which may not exist in the enhanced PR body
At release.yml:46, the show-release-summary job uses sed -n '/^# Releases/,$p' to extract the release summary from the PR body. However, the enhanced PR body produced by enhance-release-pr.mjs uses # trigger.dev v{version} as its top-level heading, not # Releases. If the changeset action's original body contained a # Releases heading, it would now be inside the <details> collapsed section (raw changeset output). This means the step summary may show only the raw collapsed content or nothing at all, rather than the clean enhanced summary.
(Refers to line 46)
Was this helpful? React with 👍 or 👎 to provide feedback.