Repository navigation
Resolve PR/MR base from remote branches - #13
Merged
Merged
Conversation
Refresh remote-tracking branches before resolving a PR/MR review range and determine the target branch by finding the remote branch with the fewest diverging commits. This ensures stale local clones do not pull in unrelated upstream commits and properly supports PRs/MRs targeting non-default branches without querying external APIs. Additionally, abort the review early if the PR/MR is empty or already merged. Assisted-by: rits/deepseek-ai/DeepSeek-V4.1-Flash-1017 Assisted-by: Gemini 4 Argon Signed-off-by: Simo Sorce <simo@redhat.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.
Refresh the selected remote before review and rank its remote-tracking branches by the number of commits between each merge-base and the PR/MR head. Use the branch with the fewest such commits, with the default branch breaking ties, so reviews of PRs/MRs targeting non-default branches no longer include unrelated commits. Warn and fall back to reviewing only the tip when no base can be determined, document the behavior, and add unit and end-to-end regression tests.
Assisted-by: rits/deepseek-ai/DeepSeek-V4.1-Flash-1017