Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

10 linesCodeBlameRaw
1-- Issues became work items (g1t #57): a webhook that asked for issue.*
2-- events asks for the work_item.* events that replaced them, in the same
3-- place in its list. Deliveries already made stay as they were sent; they
4-- are forgotten after a fortnight.
5UPDATE hooks
6SET events = (
7 SELECT json_group_array(CASE WHEN value LIKE 'issue.%' THEN 'work_item.' || substr(value, 7) ELSE value END)
8 FROM json_each(hooks.events)
9)
10WHERE EXISTS (SELECT 1 FROM json_each(hooks.events) WHERE value LIKE 'issue.%');