From fce16cc33e987da43c3aed21e7a4070e57eef899 Mon Sep 17 00:00:00 2001 From: Conrad Hoffmann Date: Fri, 2 Dec 2022 12:25:00 +0100 Subject: [PATCH] Use uppercase string for icon in patchset update In GraphQL, the icon has to be uppercase [1]. However, the builds worker uses the `JobContext.Job.Status` field in the payload [2], where the value is lowercase [3]. Hence, upper-case the value before sending it to the GraphQL API. [1] https://git.sr.ht/~sircmpwn/lists.sr.ht/tree/master/item/api/graph/schema.graphqls#L468-474 [2] https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/item/worker/triggers.go#L251 [3] https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/item/worker/triggers.go#L109 --- hubsrht/blueprints/webhooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hubsrht/blueprints/webhooks.py b/hubsrht/blueprints/webhooks.py index ce349bd..e4498fe 100644 --- a/hubsrht/blueprints/webhooks.py +++ b/hubsrht/blueprints/webhooks.py @@ -436,6 +436,6 @@ def build_complete(details): tool_details = f"[#{payload['id']}]({build_url}) {details['name']} {payload['status']}" lists.patchset_update_tool(ml.owner, details["tool_id"], - payload["status"], tool_details) + payload["status"].upper(), tool_details) return "Thanks!"