Skip to content

Commit 08c642d

Browse files
committed
upload: Check PRs merge into base branch rather than base ref
The logic for checking whether a PR was improperly merged was allowing the target branch name, which could be a relative branch. We don't want that, we only want changes to merge into the base branch of the entire chain. This also helps handle some reordering issues. Topic: reorder3 Reviewers: aaron, brian-k
1 parent 2bcb09f commit 08c642d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

revup/topic_stack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,11 @@ async def mark_rebases(self, skip_rebase: bool) -> None:
733733
if (
734734
review.status == PrStatus.MERGED
735735
and review.pr_info is not None
736-
and review.remote_base != review.pr_info.baseRef
736+
and self.git_ctx.remove_branch_prefix(base_branch) != review.pr_info.baseRef
737737
):
738738
logging.warning(
739739
f"Branch {review.remote_head} was merged into {review.pr_info.baseRef} "
740-
f"instead of {review.remote_base} as expected!"
740+
f"instead of {base_branch} as expected!"
741741
)
742742
# NOTE: This may not iteract well with the check at the end of create_commits
743743
# but they are both corner cases and the worst that could happen is we fail to

0 commit comments

Comments
 (0)