Dev News Daily ENDE

GitHub's async merge API is GA and now the recommended way to merge by code

GitHub has made its asynchronous merge API generally available. It can merge individual pull requests or stacks of them, add pull requests to a merge queue, or merge directly, including bypassing rules where the caller has permission to do so.

The model is a two-step exchange. An automation submits a merge request with PUT and receives a request ID, then polls with GET using that ID to check the status. GitHub says this helps automations deal with busy repositories, because a complex merge no longer has to finish inside a single request.

The changelog is explicit about direction. The async merge API is now the recommended path for merging pull requests programmatically, in place of the synchronous REST endpoint and the GraphQL mutations. It is also the only merge API that supports stacked pull requests. The existing endpoints are not described as deprecated in the announcement, but the recommendation has moved.

Request parameters and examples are in the API documentation linked from the changelog.

GitHub's async merge API is GA and now the recommended way to merge by code
GitHub's async merge API is GA and now the recommended way to merge by code — Dev News Daily

Why it matters

Bots that merge pull requests, from dependency updaters to release tooling, have usually called the synchronous endpoint and treated a slow or failed response as a failed merge. Moving to submit-and-poll changes error handling: a request can be accepted and still fail later, so the automation has to check the final status rather than the first response. Teams adopting stacked pull requests have no other API option.

Written by Victoria Shinder.