Merge pull request #5651 from lmskater/fix-comment-trigger

[Jenkins] fix the crash in comment trigger
This commit is contained in:
James Chen 2014-03-11 11:00:10 +08:00
commit c22740d96b
1 changed files with 6 additions and 6 deletions

View File

@ -14,6 +14,12 @@ def main():
#parse to json obj
payload = json.loads(payload_str)
issue = payload['issue']
#get pull number
pr_num = issue['number']
print 'pr_num:' + str(pr_num)
payload_forword = {"number":pr_num}
comment = payload['comment']
#get comment body
comment_body = comment['body']
@ -24,12 +30,6 @@ def main():
print 'skip build for pull request #' + str(pr_num)
return(0)
issue = payload['issue']
#get pull number
pr_num = issue['number']
print 'pr_num:' + str(pr_num)
payload_forword = {"number":pr_num}
#build for pull request action 'open' and 'synchronize', skip 'close'
action = issue['state']
print 'action: ' + action