From 88aa5a0830320a3021f2b3a7bd4b5d39d992d80e Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 11 Jun 2015 14:11:47 -0400 Subject: [PATCH] Switch BitBucket code to always use the latest commit Before this change, we'd use the first commit, which could be incorrect if there are multiple commits in a single push Fixes #99 --- endpoints/trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/endpoints/trigger.py b/endpoints/trigger.py index 89a74cb2f..f05bdb787 100644 --- a/endpoints/trigger.py +++ b/endpoints/trigger.py @@ -516,7 +516,7 @@ class BitbucketBuildTrigger(BuildTriggerHandler): raise SkipRequestException() # Check if this build should be skipped by commit message. - commit = payload['commits'][0] + commit = payload['commits'][-1] commit_message = commit['message'] if should_skip_commit(commit_message): logger.debug('Skipping BitBucket request due to commit message request')