Skip to content
Snippets Groups Projects

mr: check for pipeline key in api missing, or existing but being None

Merged Pablo Correa Gomez requested to merge mrhlpr-no-pipeline into master
All threads resolved!
+ 1
1
@@ -136,7 +136,7 @@ def get_pipeline_metadata(
# Get the latest pipeline (without cache so we don't miss newer ones)
url_mr = "/projects/{}/merge_requests/{}".format(origin.api_project_id, mr_id)
api = gitlab.download_json(origin, url_mr, no_cache=True)
if "pipeline" not in api:
if api.get("pipeline") is None:
logging.error("ERROR: no pipeline found in merge request")
exit(1)
Loading