Repository navigation
fix(release): skip HAR sync when release-plz creates no PR - #117
Merged
Merged
Conversation
release-plz-action reports `{}` for its `pr` output when no release PR is
created (for example, a push that touches no crate). The sync step only
checked for an empty string, so it parsed `{}`, derived an undefined
branch name, and failed with "couldn't find remote ref undefined".
Treat a missing `head_branch` as "nothing to sync" and exit successfully.
Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After #116 merged, the
Release-plz PRjob still failed, now inSync OHPM HAR versions and changelogs to release PR:#116 only touched lockfiles, scripts and docs, so release-plz had no crate to release and created no release PR.
release-plz-action@v0.5reports itsproutput as{}in that case, but the step only guarded against an empty string. The script parsed{},pr.head_branchwasundefined, andgit fetch origin undefinedfailed.Changes
Treat a missing
head_branchas "nothing to sync": print a message and exit successfully before any git operation. Real release PRs are unchanged.Verification
Extracted branch-name logic tested locally:
🤖 Generated with Claude Code