Skip to content
Snippets Groups Projects
Unverified Commit 76062a82 authored by Pablo Correa Gomez's avatar Pablo Correa Gomez :beach:
Browse files

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

Fixes #25

Inspired from hexaheximal
parent d49a1ccf
No related branches found
No related tags found
No related merge requests found
Pipeline #210698 passed with warnings
......@@ -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", None) is None:
logging.error("ERROR: no pipeline found in merge request")
exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment