@@ -161,15 +161,23 @@ def get_master_branch(self) -> Any:
161
161
Returns:
162
162
corresponding branch
163
163
"""
164
- return self .get_branch (configuration .get_value (ConfigurationVariable .MASTER_BRANCH ))
164
+ main = configuration .get_value (ConfigurationVariable .MASTER_BRANCH )
165
+ branch = self .get_branch (main )
166
+ if branch :
167
+ return branch
168
+ return self .get_remote_branch (main )
165
169
166
170
def get_beta_branch (self ) -> Any :
167
171
"""Gets the `beta` branch.
168
172
169
173
Returns:
170
174
corresponding branch
171
175
"""
172
- return self .get_branch (configuration .get_value (ConfigurationVariable .BETA_BRANCH ))
176
+ beta = configuration .get_value (ConfigurationVariable .BETA_BRANCH )
177
+ branch = self .get_branch (beta )
178
+ if branch :
179
+ return branch
180
+ return self .get_remote_branch (beta )
173
181
174
182
def is_release_branch (self , branch_name : Optional [str ]) -> bool :
175
183
"""Checks whether the branch is a `release` branch or not.
@@ -521,7 +529,7 @@ def _get_remote(self) -> Optional[Any]:
521
529
522
530
def list_files_added_on_current_branch (self ) -> List [str ]:
523
531
"""Returns a list of files changed against master branch."""
524
- master_branch_commit = self .repo .commit (configuration . get_value ( ConfigurationVariable . MASTER_BRANCH ))
532
+ master_branch_commit = self .repo .commit (self . get_master_branch ( ))
525
533
current_branch_commit = self .repo .commit (self .get_current_branch ())
526
534
changes = self .get_changes_list (
527
535
self .get_branch_point (master_branch_commit , current_branch_commit ), current_branch_commit , change_type = "a"
0 commit comments