Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.

fix: exit 0 when there is nothing to release - #1705

Merged
tanem merged 1 commit into
masterfrom
fix/release-nothing-to-release-exit-code
Jul 28, 2026
Merged

fix: exit 0 when there is nothing to release#1705
tanem merged 1 commit into
masterfrom
fix/release-nothing-to-release-exit-code

Conversation

@tanem

@tanem tanem commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • The scheduled weekly Release workflow was failing (red X, notification noise) whenever no PRs had merged since the last tag - release() threw Error('Nothing to release'), which cli.ts treated the same as any other command failure (console.error + process.exit(1)).
  • release() now resolves 'nothing-to-release' in that case instead of throwing; cli.ts prints Nothing to release and exits 0. Genuine validation errors (unlabelled PRs, PRs with multiple labels) are unchanged and still exit 1.

Test plan

  • npm run check:types, npm run lint, npm run check:format all pass
  • npm run build succeeds
  • npm run test:src and npm run test:cjs both pass all 3 release unit tests (source and compiled dist behave identically)
  • Confirmed the 3 unrelated cli.test.ts failures (authors/changelog integration tests needing a live CHANGELOG_GITHUB_TOKEN) are pre-existing on master, not introduced by this change

🤖 Generated with Claude Code

The weekly release workflow was failing with a stack trace whenever no
PRs had merged since the last tag, which is a normal outcome, not an
error. release() now resolves 'nothing-to-release' instead of
throwing, so the CLI prints a message and exits 0 in that case while
still failing loudly for genuine validation errors (unlabelled or
multi-labelled PRs).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tanem
tanem merged commit 7b85564 into master Jul 28, 2026
1 check passed
@tanem tanem added the internal label Jul 28, 2026
@tanem
tanem deleted the fix/release-nothing-to-release-exit-code branch July 28, 2026 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant