mirror of https://github.com/axmolengine/axmol.git
[Jenkins] fix the crash in comment trigger
This commit is contained in:
parent
931246b148
commit
bdd66ee0fd
|
@ -14,6 +14,12 @@ def main():
|
||||||
#parse to json obj
|
#parse to json obj
|
||||||
payload = json.loads(payload_str)
|
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']
|
comment = payload['comment']
|
||||||
#get comment body
|
#get comment body
|
||||||
comment_body = comment['body']
|
comment_body = comment['body']
|
||||||
|
@ -23,12 +29,6 @@ def main():
|
||||||
if result is None:
|
if result is None:
|
||||||
print 'skip build for pull request #' + str(pr_num)
|
print 'skip build for pull request #' + str(pr_num)
|
||||||
return(0)
|
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'
|
#build for pull request action 'open' and 'synchronize', skip 'close'
|
||||||
action = issue['state']
|
action = issue['state']
|
||||||
|
|
Loading…
Reference in New Issue