Skip to content

Fix AfterCreateService to trigger hooks after MR state changes

What does this MR do and why?

Previously AfterCreateService was triggering hooks and integrations early in the service. This meant the hook payload built from the merge request reflected its state before the service had run. By moving the hook and integrations trigger to happen at the end of the service we POST a payload that reflects the state of the MR after the service has run.

Fixes #327452 (closed) where the merge_status property was still "preparing".

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #327452 (closed)

Edited by Luke Duncalfe

Merge request reports