fix: checkout existing release branch in release workflow - #338
Merged
philbrookes merged 1 commit intoJul 13, 2026
Conversation
The release workflow always created a new local branch, which failed when the release branch already existed on origin (e.g. patch releases). Check for the remote branch first and fetch/checkout it if present. Signed-off-by: Phil Brookes <pbrookes@redhat.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
📝 WalkthroughWalkthroughThe release workflow now checks out an existing remote release branch when available and creates a new branch otherwise, before continuing with release preparation and publication. ChangesRelease branch flow
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
guicassolato
approved these changes
Jul 13, 2026
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.
Summary
Problem
The release workflow unconditionally ran
git checkout -b <release-branch>, which created a new local branch from the checked-out gitRef. When the release branch already existed on origin (from a previous release), the subsequentgit pushwas rejected because the local branch diverged from the remote.See: https://github.com/Kuadrant/authorino-operator/actions/runs/29233186429/job/86761778828
Summary by CodeRabbit