Skip to content

fix(create-release-branch): allow empty "Initialize Release" commit - #142

Merged
Mrtenz merged 2 commits into
mainfrom
mrtenz/allow-empty-initialize-release-commit
Nov 2, 2026
Merged

Mrtenz merged 2 commits into
mainfrom
mrtenz/allow-empty-initialize-release-commit

Conversation

@Mrtenz

@Mrtenz Mrtenz commented Nov 2, 2026

Copy link
Copy Markdown
Member

Explanation

create-release-branch updates the changelogs of changed packages and then commits them as "Initialize Release". PRs now edit changelogs by hand, so the changelogs are usually already up to date. There is then nothing to stage, git commit fails with "nothing to commit", and the whole run on main aborts.

This adds an allowEmpty option to commitAllChanges, which passes --allow-empty to git commit. Only the "Initialize Release" commit uses it. The other commits behave as before.

References

None.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

`create-release-branch` always commits after updating changelogs. When the changelogs are already up to date, which is now the norm because PRs edit them by hand, there is nothing to stage and `git commit` fails with "nothing to commit", aborting the run.

Add an `allowEmpty` option to `commitAllChanges` that passes `--allow-empty`, and use it for the "Initialize Release" commit only.
@Mrtenz
Mrtenz marked this pull request as ready for review November 2, 2026 12:10
@Mrtenz
Mrtenz requested a review from a team as a code owner November 2, 2026 12:10
@Mrtenz
Mrtenz deployed to default-branch November 2, 2026 12:11 — with GitHub Actions Active
Add an `[Unreleased]` entry for the `create-release-branch` fix from #142. The "Initialize Release" commit no longer fails when the changelogs are already up to date.
@Mrtenz
Mrtenz added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 99aa4d8 Nov 2, 2026
54 checks passed
@Mrtenz
Mrtenz deleted the mrtenz/allow-empty-initialize-release-commit branch November 2, 2026 12:31
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