Merge pull request #527 from jzelinskie/fix-custom-git
fix skipping builds with custom-git
This commit is contained in:
commit
dc1d3f73d2
1 changed files with 6 additions and 3 deletions
|
@ -71,8 +71,11 @@ def find_matching_branches(config, branches):
|
|||
return branches
|
||||
|
||||
|
||||
def should_skip_commit(message):
|
||||
return '[skip build]' in message or '[build skip]' in message
|
||||
def should_skip_commit(metadata):
|
||||
if 'commit_info' in metadata:
|
||||
message = metadata['commit_info']['message']
|
||||
return '[skip build]' in message or '[build skip]' in message
|
||||
return False
|
||||
|
||||
|
||||
def raise_if_skipped_build(prepared_build, config):
|
||||
|
@ -93,7 +96,7 @@ def raise_if_skipped_build(prepared_build, config):
|
|||
raise SkipRequestException()
|
||||
|
||||
# Check the commit message.
|
||||
if should_skip_commit(prepared_build.metadata['commit_info']['message']):
|
||||
if should_skip_commit(prepared_build.metadata):
|
||||
logger.debug('Skipping request due to commit message request')
|
||||
raise SkipRequestException()
|
||||
|
||||
|
|
Reference in a new issue