Alert on merges with failing pipeline

For our use case, we want to send out an alerting email in case a merge request is merged when the pipeline is failing. How can this be achieved?
I see we can subscribe to notifications for a project independently for these i.e. for the merges and for the failing pipeline but in our case we would want a notification in case a merge was made with a failing pipeline. Any leads/help would be appreciated.

Hi @darkknightawakens

would it work for you to set your repo so that mrs cannot be merged if a pipeline fails?


Hi @snim2 thanks for the reply. Yes, we know of this solution. To account for exceptional cases (unstable pipeline), we are trying to avoid this scenario i.e. blocking the merge requests in case of pipeline failures.