Hello,
Recently I have been asked to configure an email notification to Teams when an Automatic Merge Failure occurs when using the Automatic Branch Merging feature of BitBucket.
I have a done a lot of research and have not been able to find a solution that works.
I explored the Webhook route but noticed that there was not an event type that matched "Automatic Merge Failure":
https://confluence.atlassian.com/bitbucketserver076/managing-webhooks-in-bitbucket-server-1026535073.html
I found this old thread about Stash, which described that the cascading merge conflict email would only get sent to the person who created the PR - but our situation is similar to one person who replied who described using a headless service account to perform the PR and merge:
https://community.atlassian.com/t5/Answers-Developer-Questions/email-notifications-for-cascade-merge-conflict/qaq-p/512963
I briefly looked into PowerAutomate tool to try and detect the email / Teams notification via the Office 365 BitBucket Connector but it also did not a way to treat "Automatic Merge Failure" - only triggers for all Pull Requests - which is useful but has too much noise for our team to catch the important missed merge conflict notice when it occurs.
https://docs.microsoft.com/en-us/connectors/bitbucket/
So our need is to detect when an "Automatic Merge Failure" and to send an email / Teams notification.
If anyone has any ideas or thoughts, I would really appreciate it.
Thanks for reading and thanks in advance!