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)