@@ -161,15 +161,23 @@ def get_master_branch(self) -> Any:
161161 Returns:
162162 corresponding branch
163163 """
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 )
165169
166170 def get_beta_branch (self ) -> Any :
167171 """Gets the `beta` branch.
168172
169173 Returns:
170174 corresponding branch
171175 """
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 )
173181
174182 def is_release_branch (self , branch_name : Optional [str ]) -> bool :
175183 """Checks whether the branch is a `release` branch or not.
@@ -521,7 +529,7 @@ def _get_remote(self) -> Optional[Any]:
521529
522530 def list_files_added_on_current_branch (self ) -> List [str ]:
523531 """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 ( ))
525533 current_branch_commit = self .repo .commit (self .get_current_branch ())
526534 changes = self .get_changes_list (
527535 self .get_branch_point (master_branch_commit , current_branch_commit ), current_branch_commit , change_type = "a"
0 commit comments