Skip to content

Commit e0c1b29

Browse files
committed
fixup! fixup! murdock/murdock.py: handle priority label changes
1 parent ff47d10 commit e0c1b29

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
@@ -459,9 +459,17 @@ async def handle_pull_request_event(self, event: dict):
459459
await set_commit_status(job.commit.sha, status)
460460
return
461461

462-
if action in ["unlabeled", "edited"]:
462+
if action in ["edited"]:
463463
return
464464

465+
if action in ["unlabeled"]:
466+
label_name = event["label"]["name"]
467+
if label_name not in config.priorities.labels.keys():
468+
return
469+
elif not self.queued.search_by_pr_number(pull_request.number):
470+
# skip re-queing if there's no queued job
471+
return
472+
465473
if action == "opened" and CI_CONFIG.ready_label in pull_request.labels:
466474
# A PR opened with "Ready label" already set will be scheduled via
467475
# the "labeled" action

0 commit comments

Comments
 (0)