diff --git a/jenkins-jobs/es-link-issue.py b/jenkins-jobs/es-link-issue.py new file mode 100644 index 00000000000..d7db3a4e50e --- /dev/null +++ b/jenkins-jobs/es-link-issue.py @@ -0,0 +1,18 @@ +import os + +import es_utils +import base64 + + +def main(): + data = os.getenv("DATA", None) + data = base64.b64decode(data.replace("@", "\n").encode()).decode() + doc = json.loads(data) + index = doc.pop("index") + doc["@timestamp"] = int(time() * 1000) + payload = json.dumps(doc) + es_utils.send_payload(index + "-failures", index, None, payload) + + +if __name__ == "__main__": + main() diff --git a/process_pr.py b/process_pr.py index bccecdddea1..9b16a70f80d 100644 --- a/process_pr.py +++ b/process_pr.py @@ -2,7 +2,7 @@ from categories import ( CMSSW_L2, - CMSSW_ORP, + CMSSW_L1, TRIGGER_PR_TESTS, CMSSW_ISSUES_TRACKERS, PR_HOLD_MANAGERS, @@ -204,7 +204,7 @@ def update_CMSSW_LABELS(repo_config): check_dpg_pog = False dpg_pog = {} if not check_dpg_pog else get_dpg_pog() for l in CMSSW_LABELS.keys(): - if check_dpg_pog and (not l in dpg_pog) and (not l in TYPE_COMMANDS): + if check_dpg_pog and (not l in dpg_pog): del CMSSW_LABELS[l] else: CMSSW_LABELS[l] = [ @@ -1135,7 +1135,7 @@ def process_pr(repo_config, gh, repo, issue, dryRun, cmsbuild_user=None, force=F br = "_".join(pr.base.ref.split("/")[:2][-1].split("_")[:3]) + "_X" if br: extra_rm = extra_rm + get_release_managers(br) - releaseManagers = list(set(extra_rm + CMSSW_ORP)) + releaseManagers = list(set(extra_rm + CMSSW_L1)) else: try: if ( @@ -1573,17 +1573,6 @@ def process_pr(repo_config, gh, repo, issue, dryRun, cmsbuild_user=None, force=F set_comment_emoji_cache(dryRun, bot_cache, comment, repository) # end of parsing comments section - # Check if it needs to be automatically closed. - if mustClose: - if issue.state == "open": - print("This pull request must be closed.") - if not dryRun: - issue.edit(state="closed") - elif reOpen: - if issue.state == "closed": - print("This pull request must be reopened.") - if not dryRun: - issue.edit(state="open") if issue.pull_request: if ( @@ -2216,6 +2205,18 @@ def process_pr(repo_config, gh, repo, issue, dryRun, cmsbuild_user=None, force=F if add_labels: issue.edit(labels=list(labels)) + # Check if it needs to be automatically closed. + if mustClose: + if issue.state == "open": + print("This pull request must be closed.") + if not dryRunOrig: + issue.edit(state="closed") + elif reOpen: + if issue.state == "closed": + print("This pull request must be reopened.") + if not dryRunOrig: + issue.edit(state="open") + if not issue.pull_request: issueMessage = None if not already_seen: