Skip to content

Commit 85b3ced

Browse files
authored
Fix CI check for unmanaged packages and none coverage (#55)
## Summary - **`bumpy ci check` no longer fails when only unmanaged packages changed** — exits cleanly with "No managed packages have changed" instead of erroring with "No bump files found" - **`none` entries count as covered in CI strict mode** — previously only `plan.releases` was checked, so packages marked with `none` in bump files would incorrectly show as uncovered ## Test plan - [x] All 202 tests pass - [ ] Test in CI with a PR that only changes unmanaged files
1 parent 6a68b4a commit 85b3ced

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.bumpy/fix-ci-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@varlock/bumpy': patch
3+
---
4+
5+
Fixed CI check to skip gracefully when no managed packages changed, and count none entries as covered in strict mode.

packages/bumpy/src/commands/ci.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ export async function ciCheckCommand(rootDir: string, opts: CheckOptions): Promi
129129
return;
130130
}
131131

132+
// Check if any managed packages actually changed — if not, no bump file is needed
133+
const changedPackages = await findChangedPackages(changedFiles, packages, rootDir, config);
134+
if (changedPackages.length === 0 && parseErrors.length === 0) {
135+
log.info('No managed packages have changed — no bump files needed.');
136+
return;
137+
}
138+
132139
const willFail = !opts.noFail || parseErrors.length > 0;
133140
const msg =
134141
parseErrors.length > 0
@@ -188,7 +195,13 @@ export async function ciCheckCommand(rootDir: string, opts: CheckOptions): Promi
188195
}
189196

190197
// Check for uncovered packages
198+
// Include both released packages and those explicitly listed in bump files (e.g. with 'none')
191199
const coveredPackages = new Set(plan.releases.map((r) => r.name));
200+
for (const bf of prBumpFiles) {
201+
for (const release of bf.releases) {
202+
coveredPackages.add(release.name);
203+
}
204+
}
192205
const changedPackages = await findChangedPackages(changedFiles, packages, rootDir, config);
193206
const missing = changedPackages.filter((name) => !coveredPackages.has(name));
194207
if (missing.length > 0) {

0 commit comments

Comments
 (0)