diff --git a/tools/jenkins-scripts/job-trigger.py b/tools/jenkins-scripts/job-trigger.py index 5e347b3f0d..8da34ab1dd 100755 --- a/tools/jenkins-scripts/job-trigger.py +++ b/tools/jenkins-scripts/job-trigger.py @@ -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