0

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! :)

WOOB
  • 1
  • 1
  • Couldn't find anything in the docs (https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request), but here's a way to test this: Create a new GitHub App and install it in your repository. Configure some smee.io URL as webhook URL and enable all types of events. With that setup, trigger the automerge and see if an event is fired. – rethab Nov 17 '21 at 08:00
  • 1
    Thanks rethab, unfortunately we couldn't find anything that would convey automerge failure in there and github.com support confirmed there's no good way of doing that currently. – WOOB Nov 18 '21 at 07:30
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – MD. RAKIB HASAN Nov 23 '21 at 05:56

1 Answers1

0

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.

WOOB
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 18 '21 at 10:44