Skip to content

Commit 50b9627

Browse files
committed
fixup! fixup! murdock/murdock.py: handle priority label changes
1 parent f3ab8a6 commit 50b9627

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

murdock/murdock.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,17 @@ async def handle_pull_request_event(self, event: dict):
532532
await set_commit_status(job.commit.sha, status)
533533
return
534534

535-
if action in ["unlabeled", "edited"]:
535+
if action in ["edited"]:
536536
return
537537

538+
if action in ["unlabeled"]:
539+
label_name = event["label"]["name"]
540+
if label_name not in config.priorities.labels.keys():
541+
return
542+
elif not self.queued.search_by_pr_number(pull_request.number):
543+
# skip re-queing if there's no queued job
544+
return
545+
538546
if action == "opened" and CI_CONFIG.ready_label in pull_request.labels:
539547
# A PR opened with "Ready label" already set will be scheduled via
540548
# the "labeled" action

0 commit comments

Comments
 (0)