From 45ef1221a30f7ba02b07c60464ccd28967fc8351 Mon Sep 17 00:00:00 2001 From: Deborah Brouwer Date: Fri, 13 Dec 2024 17:29:23 -0800 Subject: [PATCH] ci: post gantt: ignore pipeline_summary message The gantt chart script currently expect the pipeline url to be the last line of marge-bot's comment on a failed pipeline. The pipeline summary hook now adds additional information that was preventing the gantt chart script from finding the pipeline url. Change the regex for finding the pipeline url to account for pipeline summary comments. Part-of: --- bin/ci/ci_post_gantt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/ci/ci_post_gantt.py b/bin/ci/ci_post_gantt.py index 961453e4794..4057091fa22 100755 --- a/bin/ci/ci_post_gantt.py +++ b/bin/ci/ci_post_gantt.py @@ -138,7 +138,9 @@ def main( continue last_event_at = event.created_at - match = re.search(r"https://[^ ]+", event.note["body"]) + escaped_gitlab_url = re.escape(GITLAB_URL) + match = re.search(rf"{escaped_gitlab_url}/[^\s<]+", event.note["body"]) + if match: try: log.info(f"Found message: {event.note['body']}")