@@ -74,13 +74,13 @@ class GitHubCtx:
7474def get_custom_jobs (ctx : GitHubCtx ) -> List [str ]:
7575 """
7676 Tries to parse names of specific CI jobs that should be executed in the form of
77- ci -job: <job-name>
77+ try -job: <job-name>
7878 from the commit message of the passed GitHub context.
7979 """
8080 if ctx .commit_message is None :
8181 return []
8282
83- regex = re .compile (r"^ci -job: (.*)" , re .MULTILINE )
83+ regex = re .compile (r"^try -job: (.*)" , re .MULTILINE )
8484 jobs = []
8585 for match in regex .finditer (ctx .commit_message ):
8686 jobs .append (match .group (1 ))
@@ -120,16 +120,20 @@ def calculate_jobs(run_type: WorkflowRunType, job_data: Dict[str, Any]) -> List[
120120 if custom_jobs :
121121 if len (custom_jobs ) > 10 :
122122 raise Exception (
123- f"It is only possible to schedule up to 10 custom jobs,"
123+ f"It is only possible to schedule up to 10 custom jobs, "
124124 f"received { len (custom_jobs )} jobs"
125125 )
126126
127127 jobs = []
128+ unknown_jobs = []
128129 for custom_job in custom_jobs :
129130 job = [j for j in job_data ["auto" ] if j ["image" ] == custom_job ]
130131 if not job :
131- raise Exception (f"Custom job `{ custom_job } ` not found in auto jobs" )
132+ unknown_jobs .append (custom_job )
133+ continue
132134 jobs .append (job [0 ])
135+ if unknown_jobs :
136+ raise Exception (f"Custom job(s) `{ unknown_jobs } ` not found in auto jobs" )
133137
134138 return add_base_env (name_jobs (jobs , "try" ), job_data ["envs" ]["try" ])
135139 elif run_type is AutoRunType :
0 commit comments