Fix API URL in Notifier

This commit is contained in:
Radek Golan 2024-04-24 14:21:24 +02:00
parent c00ea15488
commit 02b30d406b

View File

@ -68,7 +68,7 @@ try:
if not success:
with APISession(environ["PLUGIN_WOODPECKER_URL"].rstrip("/")) as client:
client.headers.setdefault("Authorization", f"Bearer {environ["PLUGIN_WOODPECKER_TOKEN"]}")
pipeline_url = urlparse(environ["CI_PIPELINE_URL"]).path
pipeline_url = urlparse(environ["CI_PIPELINE_URL"]).path + "s"
pipeline_info = client.get(pipeline_url).json()
for workflow in pipeline_info["workflows"]:
if workflow["name"] != environ["CI_WORKFLOW_NAME"]: