Make sure we never have a None default branch

Fixes #2134
This commit is contained in:
Joseph Schorr 2016-11-17 14:21:44 -05:00
parent 848a3d4cc3
commit 9600d3c2fc

View file

@ -52,7 +52,7 @@ def determine_build_ref(run_parameters, get_branch_sha, get_tag_sha, default_bra
value = run_parameters['branch_name'] value = run_parameters['branch_name']
kind = kind or 'branch' kind = kind or 'branch'
value = value or default_branch value = value or default_branch or 'master'
ref = 'refs/tags/' + value if kind == 'tag' else 'refs/heads/' + value ref = 'refs/tags/' + value if kind == 'tag' else 'refs/heads/' + value
commit_sha = get_tag_sha(value) if kind == 'tag' else get_branch_sha(value) commit_sha = get_tag_sha(value) if kind == 'tag' else get_branch_sha(value)