Add `merged_at` to merge request webhook payload
What does this MR do and why?
Adds merged_at to the merge request webhook object_attributes payload. The field is sourced from MergeRequest::Metrics#merged_at and is null for non-merged MRs.
Problem
The MR webhook payload includes state: "merged" but not when the merge happened. Webhook consumers that need merged_at have to make a separate GET /projects/:id/merge_requests/:iid API call to retrieve it.
How to set up and validate locally
- Create a project with a webhook configured for merge request events
- Open and merge an MR
- Check the webhook payload in Settings → Webhooks → Edit → Recent events
- Verify
object_attributes.merged_atis present with the merge timestamp - Add a label to the merged MR — verify
merged_atis still present in the new webhook payload