Make the regex more robust

This commit is contained in:
Jakub Beránek
2024-05-02 22:41:11 +02:00
parent 74dbe8ae9e
commit e2e280610d
@@ -80,7 +80,7 @@ def get_custom_jobs(ctx: GitHubCtx) -> List[str]:
if ctx.commit_message is None:
return []
regex = re.compile(r"ci-job: (.*)")
regex = re.compile(r"^ci-job: (.*)", re.MULTILINE)
jobs = []
for match in regex.finditer(ctx.commit_message):
jobs.append(match.group(1))