Fix bitbucket trigger to use the specified branch name before the default branch

This commit is contained in:
Joseph Schorr 2015-05-13 13:55:44 -04:00
parent 6a52ffa942
commit 0e86fc80ca

View file

@ -526,7 +526,7 @@ class BitbucketBuildTrigger(BuildTriggerHandler):
branch_name = run_parameters.get('branch_name')
(result, data, _) = repository.get_main_branch()
if result:
branch_name = data['name'] or branch_name
branch_name = branch_name or data['name']
# Lookup the commit SHA for the branch.
(result, data, _) = repository.get_branches()