diff --git a/Jenkinsfile b/Jenkinsfile index 805db2e..409b9d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -100,6 +100,23 @@ payload = json.dumps({ "version": data["version"], }).encode("utf-8") +url = f"{taiga_url}/api/v1/{endpoint}/{data['id']}" +req = urllib.request.Request( + url, + data=payload, + headers=headers, + method="PATCH", +) + +try: + with urllib.request.urlopen(req) as r: + print(f"Commented Taiga TG-{ref} ({label}), HTTP {r.status}") +except urllib.error.HTTPError as e: + body = e.read().decode("utf-8", errors="replace") + print(f"Taiga comment failed: HTTP {e.code}") + print(body) + raise SystemExit(0) + url = f"{taiga_url}/api/v1/{endpoint}/{data['id']}/comments" req = urllib.request.Request( url,