File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -439,14 +439,16 @@ async def handle_pull_request_event(self, event: dict):
439439 return
440440
441441 if action == "labeled" :
442- if event ["label" ]["name" ] != CI_CONFIG .ready_label :
443- return
444- # Skip already queued jobs
445- if event ["label" ][
446- "name"
447- ] == CI_CONFIG .ready_label and self .queued .search_by_pr_number (
448- pull_request .number
449- ):
442+ # return if the ready label was set for an already queued job,
443+ # or if the label wouldn't change the job's priority (and thus
444+ # queue position).
445+ # otherwise, fall through to re-scheduling the job.
446+ label_name = event ["label" ]["name" ]
447+ if label_name == CI_CONFIG .ready_label :
448+ # Skip already queued jobs for ready label
449+ if self .queued .search_by_pr_number (pull_request .number ):
450+ return
451+ elif label_name not in config .priorities .labels .keys ():
450452 return
451453
452454 await self .schedule_job (job )
You can’t perform that action at this time.
0 commit comments