Skip to content

Added initial version of changeset ci check scripts - #29428

Merged
acburdine merged 8 commits into
mainfrom
feat/change-check
Jul 21, 2026
Merged

acburdine merged 8 commits into
mainfrom
feat/change-check

Conversation

@acburdine

Copy link
Copy Markdown
Member

no ref

  • add catalog-aware diffing logic leveraging pnpm libraries to determine packages changed between versions
  • add initial version of change-check script to ensure that changed publishable packages have committed changesets
  • refactor release/clean scripts to esm

Initial work on pnpm-based changeset release flows. Ideally, the new script in ./scripts/change-check.js replicates the behavior that pnpm change check will implement.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR adds changeset validation to CI and the pre-commit hook, with workspace and Git helpers for detecting package and catalog changes. Release automation is migrated to ES modules and gains a packages-only mode driven by workflow environment variables. Workspace catalog metadata and package manager configuration are updated. A new workflow publishes public workspace packages through npm trusted publishing, while the previous Koenig publishing path is removed.

Possibly related PRs

  • TryGhost/Ghost#29410: Both changes update release script wiring between release.js and release.cjs.

Suggested reviewers: 9larsons

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: initial changeset CI check scripts.
Description check ✅ Passed The description matches the PR scope and mentions the new changeset check and pnpm-based release work.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/change-check

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit db0fcaa

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 58s View ↗
nx run-many -t test:unit -p @tryghost/adapter-b... ✅ Succeeded 7m 16s View ↗
nx run ghost:test:integration ✅ Succeeded 3m 7s View ↗
nx run @tryghost/admin:test:acceptance ✅ Succeeded 6m 26s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 20s View ↗
nx run-many -t lint -p @tryghost/adapter-base-r... ✅ Succeeded 3m 29s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 10s View ↗
nx run ghost-admin:test ✅ Succeeded 3m 11s View ↗
Additional runs (8) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-21 17:48:43 UTC

@codecov

codecov Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.57%. Comparing base (04fff3e) to head (db0fcaa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29428      +/-   ##
==========================================
+ Coverage   74.53%   74.57%   +0.03%     
==========================================
  Files        1605     1605              
  Lines      141105   141105              
  Branches    17200    17210      +10     
==========================================
+ Hits       105173   105223      +50     
+ Misses      34875    34855      -20     
+ Partials     1057     1027      -30     
Flag Coverage Δ
admin-tests 55.44% <ø> (ø)
e2e-tests 76.65% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@acburdine
acburdine marked this pull request as ready for review July 17, 2026 20:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/create-package.js`:
- Line 7: Update the ESM import in create-package.js to include the .js
extension when importing ROOT_DIR from ./lib/constants, leaving the imported
symbol and surrounding logic unchanged.

In `@scripts/lib/git.js`:
- Around line 16-22: Update getFileFromCommit to support an explicit
nullable/missing-file mode that returns a falsy result when the requested path
does not exist, while continuing to throw for invalid commits and other Git
failures. Update loadPackage to use this mode when checking the base package
manifest so new packages follow the existing changeset-required path, and add
coverage for that scenario.
- Around line 56-62: Update pathHasChanges to normalize each changed file to a
path relative to the supplied path before applying the ignorePatterns matcher,
while preserving repository-relative paths for change detection. Ensure
pnpm-style patterns such as test/** match files within the target package and
ignored-only changes are excluded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3ce9dc1c-546b-47c1-86ba-31c698178356

📥 Commits

Reviewing files that changed from the base of the PR and between 6e15b9d and f99ed7c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (13)
  • .github/workflows/release.yml
  • ghost/core/package.json
  • package.json
  • pnpm-workspace.yaml
  • scripts/README.md
  • scripts/change-check.js
  • scripts/clean.js
  • scripts/create-package.js
  • scripts/lib/git.js
  • scripts/lib/pnpm.js
  • scripts/package.json
  • scripts/release.js
  • scripts/test/pnpm.test.js

Comment thread scripts/create-package.js Resolved
Comment thread scripts/lib/git.js Resolved
Comment thread scripts/lib/git.js Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish-packages.yml:
- Around line 67-70: Disable dependency caching in the OIDC publishing job by
removing the cache configuration from the setup-node step using
actions/setup-node and retaining only the required Node.js version setup.

In `@scripts/publish-packages.js`:
- Around line 109-118: Update the publish loop and final summary in
scripts/publish-packages.js so packages processed with dryRun are not added to
the published list or reported as actually published. Track dry-run packages
separately and include them in a clearly labeled simulated/dry-run summary while
preserving the existing real publish and skipped summaries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eb16f0e7-7fb3-4b79-9ba0-92b84b389250

📥 Commits

Reviewing files that changed from the base of the PR and between f99ed7c and b48a0c5.

📒 Files selected for processing (15)
  • .changeset/cold-jeans-call.md
  • .github/workflows/ci.yml
  • .github/workflows/publish-koenig-package.yml
  • .github/workflows/publish-packages.yml
  • packages/adapters/redirects-base/package.json
  • packages/adapters/scheduling-base/package.json
  • packages/adapters/sso-base/package.json
  • scripts/create-package.js
  • scripts/lib/git.js
  • scripts/lib/pnpm.js
  • scripts/publish-koenig-packages.cjs
  • scripts/publish-packages.js
  • scripts/release.js
  • scripts/test/git.test.js
  • scripts/test/pnpm.test.js
💤 Files with no reviewable changes (5)
  • packages/adapters/scheduling-base/package.json
  • .github/workflows/publish-koenig-package.yml
  • packages/adapters/redirects-base/package.json
  • scripts/publish-koenig-packages.cjs
  • packages/adapters/sso-base/package.json
🚧 Files skipped from review as they are similar to previous changes (4)
  • scripts/test/pnpm.test.js
  • scripts/create-package.js
  • scripts/release.js
  • scripts/lib/pnpm.js

Comment thread .github/workflows/publish-packages.yml Resolved
Comment thread scripts/publish-packages.js Resolved
@acburdine
acburdine force-pushed the feat/change-check branch from b48a0c5 to 8cc7152 Compare July 18, 2026 02:15

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/publish-packages.yml (1)

62-63: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Disable credential persistence in the checkout action.

Since this workflow job operates with privileged id-token: write access (and OIDC publishing workflows should generally operate with least privilege), it is recommended to prevent actions/checkout from persisting the default GITHUB_TOKEN in the local Git configuration. This mitigates the risk of a compromised dependency extracting the token.

🛡️ Proposed fix
       - name: Checkout code
         uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
+        with:
+          persist-credentials: false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/publish-packages.yml around lines 62 - 63, Update the
“Checkout code” actions/checkout step to disable credential persistence by
setting its persist-credentials option to false, while preserving the pinned
action reference and existing workflow permissions.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/publish-packages.yml:
- Around line 62-63: Update the “Checkout code” actions/checkout step to disable
credential persistence by setting its persist-credentials option to false, while
preserving the pinned action reference and existing workflow permissions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e3618024-b129-4a93-82e7-8e89495a0fe2

📥 Commits

Reviewing files that changed from the base of the PR and between b48a0c5 and 8cc7152.

📒 Files selected for processing (17)
  • .changeset/cold-jeans-call.md
  • .github/workflows/ci.yml
  • .github/workflows/publish-koenig-package.yml
  • .github/workflows/publish-packages.yml
  • .github/workflows/release.yml
  • package.json
  • packages/adapters/redirects-base/package.json
  • packages/adapters/scheduling-base/package.json
  • packages/adapters/sso-base/package.json
  • scripts/create-package.js
  • scripts/lib/git.js
  • scripts/lib/pnpm.js
  • scripts/publish-koenig-packages.cjs
  • scripts/publish-packages.js
  • scripts/release.js
  • scripts/test/git.test.js
  • scripts/test/pnpm.test.js
💤 Files with no reviewable changes (5)
  • .github/workflows/publish-koenig-package.yml
  • packages/adapters/sso-base/package.json
  • packages/adapters/scheduling-base/package.json
  • packages/adapters/redirects-base/package.json
  • scripts/publish-koenig-packages.cjs
🚧 Files skipped from review as they are similar to previous changes (8)
  • .changeset/cold-jeans-call.md
  • scripts/test/git.test.js
  • scripts/test/pnpm.test.js
  • scripts/lib/git.js
  • package.json
  • scripts/lib/pnpm.js
  • .github/workflows/ci.yml
  • scripts/release.js

@acburdine
acburdine requested review from 9larsons and kevinansfield and removed request for kevinansfield July 18, 2026 02:51
@acburdine
acburdine force-pushed the feat/change-check branch from 72e6d55 to 8443b9d Compare July 20, 2026 15:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
scripts/release.js (1)

74-74: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider importing the shared CHANGES_DIR constant instead of hardcoding .changeset.

scripts/lib/pnpm.js already imports CHANGES_DIR from @pnpm/releasing.versioning for the same concept; hardcoding '.changeset' here duplicates that value and risks silent drift if the underlying constant ever changes.

♻️ Proposed refactor
+import {CHANGES_DIR} from '`@pnpm/releasing.versioning`';
+
 function applyChangesetVersions() {
-    if (!existsSync(join(ROOT_DIR, '.changeset'))) {
+    if (!existsSync(join(ROOT_DIR, CHANGES_DIR))) {
         log('No .changeset directory — nothing to version');
         return;
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/release.js` at line 74, Update the release script’s `.changeset`
existence check to reuse the shared CHANGES_DIR constant from
`@pnpm/releasing.versioning`, matching scripts/lib/pnpm.js, and remove the
hardcoded directory value while preserving the existing join and conditional
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/hooks/pre-commit.bash:
- Around line 115-117: Update the pre-commit branch around CHANGESET_BASE and
change-check.js so validation includes staged index contents rather than
comparing only against HEAD. Use git diff --cached directly or invoke a
staged-aware change-check mode, while preserving the existing no-base and
no-branch-commits behavior.

In @.github/workflows/publish-packages.yml:
- Around line 62-63: Update the actions/checkout step in the publish workflow to
disable credential persistence by setting persist-credentials to false. Keep the
existing pinned checkout action and all other job permissions unchanged.

In `@scripts/lib/pnpm.js`:
- Around line 130-160: Update getPublishablePackages to pass the computed ignore
patterns through the glob option supported by node:fs/promises.glob(), using
exclude instead of ignore. Preserve the existing negated workspace-entry
filtering and subsequent package selection logic.

---

Nitpick comments:
In `@scripts/release.js`:
- Line 74: Update the release script’s `.changeset` existence check to reuse the
shared CHANGES_DIR constant from `@pnpm/releasing.versioning`, matching
scripts/lib/pnpm.js, and remove the hardcoded directory value while preserving
the existing join and conditional behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 93299b26-25c0-43f2-a884-f6b3da4c9ead

📥 Commits

Reviewing files that changed from the base of the PR and between 72e6d55 and 8443b9d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • .github/CONTRIBUTING.md
  • .github/hooks/pre-commit.bash
  • .github/workflows/ci.yml
  • .github/workflows/publish-koenig-package.yml
  • .github/workflows/publish-packages.yml
  • .github/workflows/release.yml
  • ghost/core/package.json
  • package.json
  • pnpm-workspace.yaml
  • scripts/README.md
  • scripts/change-check.js
  • scripts/clean.js
  • scripts/create-package.js
  • scripts/lib/git.js
  • scripts/lib/pnpm.js
  • scripts/package.json
  • scripts/publish-koenig-packages.cjs
  • scripts/publish-packages.js
  • scripts/release.js
  • scripts/test/git.test.js
  • scripts/test/pnpm.test.js
💤 Files with no reviewable changes (2)
  • .github/workflows/publish-koenig-package.yml
  • scripts/publish-koenig-packages.cjs
🚧 Files skipped from review as they are similar to previous changes (13)
  • pnpm-workspace.yaml
  • .github/workflows/release.yml
  • scripts/package.json
  • scripts/create-package.js
  • ghost/core/package.json
  • package.json
  • scripts/test/pnpm.test.js
  • scripts/README.md
  • scripts/clean.js
  • scripts/change-check.js
  • scripts/publish-packages.js
  • scripts/lib/git.js
  • .github/workflows/ci.yml

Comment thread .github/hooks/pre-commit.bash Resolved
Comment thread .github/workflows/publish-packages.yml Resolved
Comment thread scripts/lib/pnpm.js Resolved
@acburdine
acburdine force-pushed the feat/change-check branch from 3963582 to 314ccd6 Compare July 21, 2026 16:38
no ref
- add catalog-aware diffing logic leveraging pnpm libraries to determine packages changed between versions
- add initial version of change-check script to ensure that changed publishable packages have committed changesets
- refactor release/clean scripts to esm
@acburdine
acburdine force-pushed the feat/change-check branch from 314ccd6 to db0fcaa Compare July 21, 2026 17:37
@acburdine
acburdine enabled auto-merge (squash) July 21, 2026 17:40
@acburdine
acburdine merged commit 0d930ee into main Jul 21, 2026
53 checks passed
@acburdine
acburdine deleted the feat/change-check branch July 21, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant