mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
bin/ci: escape literal url in regex
Fixes: b24dd1fa1c ("ci: Fix parse GitLab pipeline url")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29718>
This commit is contained in:
parent
5c50e028d1
commit
44e6850016
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ def get_gitlab_pipeline_from_url(gl, pipeline_url) -> tuple:
|
|||
:param pipeline_url: string with a url to a pipeline
|
||||
:return: ProjectPipeline, Project objects
|
||||
"""
|
||||
pattern = rf"^{GITLAB_URL}/(.*)/-/pipelines/([0-9]+)$"
|
||||
pattern = rf"^{re.escape(GITLAB_URL)}/(.*)/-/pipelines/([0-9]+)$"
|
||||
match = re.match(pattern, pipeline_url)
|
||||
if not match:
|
||||
raise AssertionError(f"url {pipeline_url} doesn't follow the pattern {pattern}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue