No way to determine if MR accepted or updated from webhook
I have a webhook handling the notification for when a merge request is approved. However if a merge request is updated after that (milestone, assigned to) the same notification is received. The same behavior happens if you create a merge request, then update it before merging. The "state" is still "opened". I can get around this by comparing the created & updated times.
However I can't seem to differentiate "merge request merged" from "already merged merge request updated" so we have duplicate actions happening.
There should really be an "operation" value in the webhooks for more fine grained control over what is actually happening. I don't believe the "state" and "merge_state" is any use.
operation: "merge"
operation: "create"
operation: "update"
operation: "close"
This way, per MR the "create" op would only fire once, as would "close" or "merge".