diff --git a/scripts/cancel_pipelines.py b/scripts/cancel_pipelines.py index acea143ee6fd2e0479be2b445214555d91223a26..b894b0df1608bb0046ff817669d8ae2cb0834a33 100755 --- a/scripts/cancel_pipelines.py +++ b/scripts/cancel_pipelines.py @@ -46,11 +46,11 @@ def cancel_pipelines( ref: str = "", below_pipeline_id: int = sys.maxsize, ) -> list[ProjectPipeline]: - """Cancel currently running pipelines. + """Cancel GitLab pipelines. Args: project: GitLab project the pipeline belongs to - ref: Git ref (branch or tag) the pipeline is running on + ref: Git ref (branch or tag) the pipeline belongs to below_pipeline_id: cancel only pipelines with ID below this Returns: @@ -58,7 +58,7 @@ def cancel_pipelines( """ pipelines = project.pipelines.list( - ref=ref, status="running", as_list=False, retry_transient_errors=True + ref=ref, as_list=False, retry_transient_errors=True ) cancelled_pipelines = [] @@ -117,7 +117,7 @@ def main(): cancelled_pipelines = cancel_pipelines(project, args.ref, args.below_pipeline_id) if not cancelled_pipelines: - print("No running pipelines found.") + print("No pipelines found.") sys.exit(0) print("Cancelled pipelines:")