Add actioned_at timestamp to merge request webhooks

What does this MR do and why?

The updated_at field in webhook payloads reflects when the merge request model was last updated, which may not align with when the webhook action actually occurred. This is particularly problematic for approval webhooks where updated_at shows the timestamp from before the approval.

This MR adds a new actioned_at timestamp field to merge request webhook payloads to represent when the webhook action occurred which represents the timing of the event more accurately.

NOTE:

  • actioned_at defaults to Time.current when any MergeRequest webhook fires
  • We may want to override with action-specific timestamps (e.g., approved_at, merged_at, closed_at) in the future if returning matching timestamp becomes important.

References

#414759 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Get webhook receiver URL by using services like https://webhook.site
  2. In your GitLab project: Settings > Webhooks > Add new webhook
  3. Paste the URL, enable "Merge request events", and save
  4. Create a new merge request
  5. Wait a few seconds
  6. Approve the merge request
  7. Check webhook.site for the payload - object_attributes.actioned_at should reflect when the webhook was fired

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #414759 (closed)

Merge request reports

Loading