From 9600d3c2fc507e13f07003825a134bf2934600e9 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 17 Nov 2016 14:21:44 -0500 Subject: [PATCH] Make sure we never have a None default branch Fixes #2134 --- buildtrigger/triggerutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtrigger/triggerutil.py b/buildtrigger/triggerutil.py index b60f38620..a3d82cedc 100644 --- a/buildtrigger/triggerutil.py +++ b/buildtrigger/triggerutil.py @@ -52,7 +52,7 @@ def determine_build_ref(run_parameters, get_branch_sha, get_tag_sha, default_bra value = run_parameters['branch_name'] 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 commit_sha = get_tag_sha(value) if kind == 'tag' else get_branch_sha(value)