mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Check that PR base is default branch in trymerge.py
I've verified this locally with dry run. Pull Request resolved: https://github.com/pytorch/pytorch/pull/73715 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
1c152f800b
commit
dc38326f1d
2
.github/scripts/trymerge.py
vendored
2
.github/scripts/trymerge.py
vendored
@ -350,6 +350,8 @@ class GitHubPR:
|
||||
repo.amend_commit_message(msg)
|
||||
|
||||
def merge_into(self, repo: GitRepo, dry_run: bool = False) -> None:
|
||||
if self.base_ref() != self.default_branch():
|
||||
raise RuntimeError("Not a pull request into default branch.")
|
||||
# Raises exception if matching rule is not found
|
||||
find_matching_merge_rule(self, repo)
|
||||
if repo.current_branch() != self.default_branch():
|
||||
|
||||
Reference in New Issue
Block a user