[Jenkins][ci skip] Check pull request title to skip build

This commit is contained in:
lm 2014-04-28 14:54:29 +08:00
parent 0f62be5562
commit b2a414a660
1 changed files with 5 additions and 2 deletions

View File

@ -69,8 +69,11 @@ def main():
message = last_commit['commit']['message']
pattern = re.compile("\[ci(\s+)skip\]", re.I)
result = pattern.search(message)
if result is not None:
result_commit_title = pattern.search(message)
title = pr['title']
result_pr_title = pattern.search(title)
if result_commit_title is not None or result_pr_title is not None:
print 'skip build for pull request #' + str(pr_num)
return(0)