From 65d03321767745e6c4b04125c485a67b713d31f2 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 5 May 2015 09:40:23 -0700 Subject: [PATCH] Skip bitbucket trigger if there is no commit branch and no commit tag --- endpoints/trigger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/endpoints/trigger.py b/endpoints/trigger.py index 79e39c8ab..6a87080eb 100644 --- a/endpoints/trigger.py +++ b/endpoints/trigger.py @@ -508,6 +508,9 @@ class BitbucketBuildTrigger(BuildTriggerHandler): raise SkipRequestException() # Check to see if this build should be skipped by ref. + if not commit.get('branch') and not commit.get('tag'): + raise SkipRequestException() + ref = 'refs/heads/' + commit['branch'] if commit.get('branch') else 'refs/tags/' + commit['tag'] raise_if_skipped(self.config, ref)