refs TG-2: test Jenkins comment
This commit is contained in:
Vendored
+17
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user