mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
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:
parent
ec7a552ffc
commit
fce16cc33e
|
@ -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!"
|
||||
|
|
Loading…
Reference in New Issue