mirror of https://github.com/axmolengine/axmol.git
[Jenkins][ci skip] Add error commit status for cancel build in queue
This commit is contained in:
parent
7d7d0b8251
commit
5cd5a2339b
|
@ -21,6 +21,14 @@ def check_queue_build(action, pr_num, statuses_url):
|
|||
if(q_pr_num == pr_num):
|
||||
if(action == 'closed') or (q_statuses_url != statuses_url):
|
||||
queues.delete_item(queue)
|
||||
target_url = os.environ['JOB_PULL_REQUEST_BUILD_URL']
|
||||
data = {"state":"error", "target_url":target_url}
|
||||
access_token = os.environ['GITHUB_ACCESS_TOKEN']
|
||||
Headers = {"Authorization":"token " + access_token}
|
||||
try:
|
||||
requests.post(statuses_url, data=json.dumps(data), headers=Headers)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
def main():
|
||||
#get payload from os env
|
||||
|
|
Loading…
Reference in New Issue