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
This commit is contained in:
Joseph Schorr 2015-06-11 14:11:47 -04:00
parent 683d5080d8
commit 88aa5a0830

View file

@ -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')