Github Automerge Failure Notification (API v4 GraphQL mutation enablePullRequestAutoMerge)

251 Views Asked by At

at my company we want to make use of the relatively new API feature "Automerge" (not through a UI but through an API call), However we can't seem to find any documentation of a webhook (or other asyc way) of finding out if a merge request failed and why, anyone know a way to receive such a notification?

Thanks! :)

1

There are 1 best solutions below

1
WOOB On

Hope this saves some work for someone out there, we asked Github.com support directly and they said there was no async / webhooky way of doing this (as of Nov 2021).

Here's a quote from the support person when asked if there were a way to find out, here's what they wrote:

There wouldn't be a great way to discern that (reason for failure) and it may be better when you see that, to use the REST API to Get the Pull Request to get some additional information.

looking at the documentation as suggested in the quote above it seems that through the "closed" action and "merged" key one could discern whether a merge was successful or not, but without any further information about the failure.