-
Notifications
You must be signed in to change notification settings - Fork 751
gerrit: fallback review URL when push has no new changes #11699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gerrit: fallback review URL when push has no new changes #11699
Conversation
When a commit was already pushed to Gerrit outside GitButler, a later push from GitButler gets remote rejected '(no new changes)'. GitButler treats this as success but no metadata was stored, so the commit stayed 'unpushed'. This change adds a fallback to generate a Gerrit review URL from the Gerrit host (derived from git remote URL) and the Gerrit Change-Id computed from GitButler change UUID. Includes an integration test verifying the fallback.
|
@godnight10061 is attempting to deploy a commit to the GitButler Team on Vercel. A member of the Team first needs to authorize it. |
Byron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for contributing, it's much appreciated!
And while I would have a thing or two to say about the test (which I would probably just refactor myself), I lack experience with Gerrit to understand the problem the PR is solving in the first place.
Maybe @krlvi could see if this pans out (and maybe even try it) beforehand. Alternatively, and independently, maybe @godnight10061 could make a before and after video to show how the fix translates to the real world?
Thanks again.
before.mp4after.mp4How to reproduce:
|
krlvi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thank you for this contribution. This fallback is indeed helpful
|
Thanks for merging! I'm glad the fallback will be useful. |

Fixes #10188
When pushing to Gerrit, if a commit was already pushed outside GitButler, Gerrit may reject with
(no new changes). GitButler treats this as success, but the push output contains no change URLs, so no Gerrit metadata was recorded and the UI kept the commit as 'unpushed' / missing the CR link.This adds a fallback in
but-gerritto derive the Gerrit host from the repo push remote and generate a review URL from the commit's GitButler change UUID (the sameI<sha1(uuid)>Change-Idused in trailers), e.g.https://<gerrit-host>/q/<change-id>.Tests
cargo test -p but-gerrit