Skip to content

Surface bump file parse errors to users#45

Merged
theoephraim merged 3 commits intomainfrom
fix/surface-bump-file-parse-errors
Apr 22, 2026
Merged

Surface bump file parse errors to users#45
theoephraim merged 3 commits intomainfrom
fix/surface-bump-file-parse-errors

Conversation

@theoephraim
Copy link
Copy Markdown
Member

Summary

  • Previously: invalid bump files (bad YAML, unknown bump types, etc.) were silently skipped — the PR comment would just say "no bump files found" with no indication anything was wrong
  • Now: parse errors are collected and surfaced in CLI output and PR comments with clear error messages
  • Also: intentionally empty bump files now get a distinct PR comment (checkmark instead of instructions to add one), and empty bump files no longer silently override valid bump files in the same PR

Test plan

  • All 199 existing tests pass (updated for new return types + new error case tests added)
  • Create a PR with a bump file containing an invalid bump type → verify error comment appears
  • Create a PR with an intentionally empty bump file → verify distinct "no bump needed" comment
  • Create a PR with both a valid and invalid bump file → verify release plan shows with errors section

Previously, invalid bump files (bad YAML, invalid bump types, etc.) were
silently skipped and the PR comment would just show "no bump files found".
Now parse errors are collected and surfaced in both CLI output and PR comments.

- parseBumpFile returns { bumpFile, errors } instead of BumpFile | null
- readBumpFiles returns { bumpFiles, errors } aggregating all parse errors
- CI check shows dedicated error comment with ❌ markers for broken files
- CI check shows distinct comment for intentionally empty bump files
- Parse errors always fail the check (even with --no-fail)
- version/release commands throw on parse errors
- Empty bump file only takes effect when no valid bump files exist alongside it
- filterBranchBumpFiles distinguishes broken files from intentionally empty ones
@bumpy-bot
Copy link
Copy Markdown
Collaborator

bumpy-bot commented Apr 22, 2026

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 1.2.0 → 1.2.1

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

The regex required a newline between --- delimiters, so ---\n---\n
(the intentionally empty format) didn't match and was reported as
an error. Now empty frontmatter is detected early and returns no
errors, matching the pre-existing behavior.
@theoephraim theoephraim merged commit 8ae14f9 into main Apr 22, 2026
2 checks passed
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.

2 participants