File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def fetch_pull_request(
107107 self ,
108108 pull_number : int ,
109109 * ,
110- remote : str = "origin" ,
110+ remote : Optional [ str ] = None ,
111111 commit : Optional [str ] = None ,
112112 force : bool = False ,
113113 ):
@@ -120,6 +120,9 @@ def fetch_pull_request(
120120 if commit and self .branch_exists (target_branch ) and self .get_branch_head (target_branch ) == commit :
121121 return target_branch
122122
123+ if not remote :
124+ remote = self .get_current_remote ()
125+
123126 cmd = ["fetch" , remote , f"pull/{ pull_number } /head:{ target_branch } " ]
124127 if force :
125128 cmd += [
@@ -171,7 +174,7 @@ def fetch(self, name: Optional[str] = None):
171174 cmd = ["fetch" , "--all" ]
172175 self ._run_git (cmd )
173176
174- def get_owner_repo (self , remote : str = "origin" ) -> Tuple [str , str ]:
177+ def get_owner_repo (self , remote : Optional [ str ] = None ) -> Tuple [str , str ]:
175178 remote_url = self .get_remote_url (name = remote )
176179 if "@" in remote_url :
177180 # ssh://gitea@example.com:owner/repo.git
You can’t perform that action at this time.
0 commit comments