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
This commit is contained in:
Conrad Hoffmann 2022-12-02 12:25:00 +01:00 committed by Drew DeVault
parent ec7a552ffc
commit fce16cc33e
1 changed files with 1 additions and 1 deletions

View File

@ -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!"