Skipped app version bump check for dependency-only changes#27865
Conversation
The version bump check fails on Renovate PRs that touch a monitored app's package.json without bumping its version field, which Renovate never does. Treats package.json-only diffs inside a monitored app as exempt so dep bumps can land without manual version bumps.
WalkthroughThe PR modifies a GitHub Actions script that validates version bumps for monitored applications. It introduces two utility functions: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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)
.github/scripts/check-app-version-bump.js (1)
188-191: ⚡ Quick winRename
isDependencyOnlyChangeto reflect what it actually checks.This function detects “package.json-only file changes,” not actual dependency-only diffs. The current name can cause future misuse.
Proposed rename for clarity
-function isDependencyOnlyChange(app, changedFiles) { +function isPackageJsonOnlyChange(app, changedFiles) { const filesInApp = getChangedAppFiles(app, changedFiles); return filesInApp.length > 0 && filesInApp.every(file => file === `${app.path}/package.json`); } ... - if (isDependencyOnlyChange(app, changedFiles)) { + if (isPackageJsonOnlyChange(app, changedFiles)) { console.log(`${app.key} only has dependency changes in package.json; skipping version bump check.`); continue; }🤖 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/scripts/check-app-version-bump.js around lines 188 - 191, Rename the function isDependencyOnlyChange to a clearer name like isPackageJsonOnlyChange (or isPackageJsonOnlyDiff) because it actually checks for package.json-only file changes; update the function declaration and all references/usages (e.g., any import, call sites) to the new name, keep the implementation using getChangedAppFiles and the same equality check `${app.path}/package.json`, and update any tests or comments that reference the old name to avoid future misuse.
🤖 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/scripts/check-app-version-bump.js:
- Around line 188-191: Rename the function isDependencyOnlyChange to a clearer
name like isPackageJsonOnlyChange (or isPackageJsonOnlyDiff) because it actually
checks for package.json-only file changes; update the function declaration and
all references/usages (e.g., any import, call sites) to the new name, keep the
implementation using getChangedAppFiles and the same equality check
`${app.path}/package.json`, and update any tests or comments that reference the
old name to avoid future misuse.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bc47e13f-df79-4006-af4e-87ce4e9c7dcc
📒 Files selected for processing (1)
.github/scripts/check-app-version-bump.js
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27865 +/- ##
==========================================
- Coverage 73.76% 73.76% -0.01%
==========================================
Files 1515 1515
Lines 127534 127534
Branches 15260 15261 +1
==========================================
- Hits 94080 94077 -3
- Misses 32507 32529 +22
+ Partials 947 928 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Check app version bumpfails any PR that changes a file underapps/{portal,sodo-search,comments-ui,announcement-bar,signup-form}without bumping that app'sversionfield. Renovate never bumps app versions when it updates dependencies, so every dep bump that touches one of those apps'package.jsonfiles dies on this check — including current security PRs (postcss, vite, others).This change exempts diffs whose only change inside a monitored app is
package.json. A human PR that edits both source andpackage.jsonin the same app still trips the check, so the cache-busting guarantee for actual code changes is preserved.Test plan
Check app version bumppasses.apps/portal/srcwithout bumpingapps/portal/package.jsonand confirm the check still fails.