Skip to content

Commit

Permalink
Manage bad branch names
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyBourne committed Jul 9, 2024
1 parent 2b005bd commit ea733a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci_tools/bot_tools/bot_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def __init__(self, pr_id = None, check_run_id = None, commit = None):
self._source_repo = self._pr_details["base"]["repo"]["full_name"]
if commit:
self._ref = commit
if '/' in self._ref:
_, _, branch = self._ref.split('/',2)
if self._ref.count('/') == 2:
_, _, branch = self._ref.split('/')
branch_info = self._GAI.get_branch_details(branch)
self._ref = branch_info['commit']['sha']
else:
Expand Down

0 comments on commit ea733a7

Please sign in to comment.