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 @@ -541,14 +541,16 @@ async def handle_pull_request_event(self, event: dict):
541541 return
542542
543543 if action == "labeled" :
544- if event ["label" ]["name" ] != CI_CONFIG .ready_label :
545- return
546- # Skip already queued jobs
547- if event ["label" ][
548- "name"
549- ] == CI_CONFIG .ready_label and self .queued .search_by_pr_number (
550- pull_request .number
551- ):
544+ # return if the ready label was set for an already queued job,
545+ # or if the label wouldn't change the job's priority (and thus
546+ # queue position).
547+ # otherwise, fall through to re-scheduling the job.
548+ label_name = event ["label" ]["name" ]
549+ if label_name == CI_CONFIG .ready_label :
550+ # Skip already queued jobs for ready label
551+ if self .queued .search_by_pr_number (pull_request .number ):
552+ return
553+ elif label_name not in config .priorities .labels .keys ():
552554 return
553555
554556 await self .schedule_job (job )
You can’t perform that action at this time.
0 commit comments