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']}")