{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Merges a pull request into the base branch in the background or adds it to a merge queue. Background processing allows certain types of errors to be retried and reduces the risk of timeouts for complex merges.\n\nThis is the required API for merging stacked pull requests. For a stacked pull request, the operation includes all open downstack pull requests.\n\nA new asynchronous merge request returns a `202` response with a UUID that can be used to [fetch the result of the merge](https://docs.github.com/rest/pulls/pulls#get-the-result-of-an-asynchronous-merge). If another asynchronous merge request is already pending for this pull request, a `409` response returns that request's UUID and merge options instead.\n\nIf the pull request is already merged or already in a merge queue, a `200` response is returned immediately. A `merged` result includes the merge commit OID. An `enqueued` result means the pull request was added to the merge queue, not that it has merged.\n\nIf the pull request cannot be merged (e.g. because it is closed, or still a draft) this result will be returned immediately with a `400` response status. Branch protection rules and repository rules are not run at this stage, only basic pull request state checks are performed.","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository without the `.git` extension. The name is not case sensitive."},"pull_number":{"type":"integer","description":"The number that identifies the pull request."}},"required":["owner","repo","pull_number"],"additionalProperties":false},"body":{"type":["object","null"],"properties":{"commit_title":{"type":"string","description":"Title for the automatic commit message. Only supported for direct merges."},"commit_message":{"type":"string","description":"Extra detail to append to automatic commit message. Only supported for direct merges."},"sha":{"type":"string","description":"SHA that pull request head must match to allow merge. If not provided, the current head of the PR at the time of the request will be used; if the PR is pushed in between the merge being requested and being executed, the merge will be cancelled."},"merge_method":{"type":"string","description":"The merge method to use for a direct merge. Only supported for direct merges.","enum":["merge","squash","rebase"]},"merge_action":{"type":"string","description":"The action that will be taken to merge the pull request. `direct_merge` merges the pull request directly without using a merge queue; `merge_queue` adds the pull request to a merge queue; `default` uses a merge queue if one is configured for the target branch, or merges directly otherwise. If omitted, defaults to `default`.","enum":["default","direct_merge","merge_queue"]},"bypass_rules":{"type":"boolean","default":false,"description":"Whether to bypass repository rules that the authenticated actor is permitted to bypass."}},"examples":[{"commit_title":"Fix race condition","commit_message":"Avoids a race by trying to read the file and handling the exception if it does not exist.","sha":"6358cd125586d9def8c3e5943f23506202da81cc","merge_method":"squash","merge_action":"direct_merge"}]}},"required":["path"],"additionalProperties":false},"name":"Merge a pull request asynchronously","id":"github.pulls.merge-async","example":{"path":{"owner":"octocat","repo":"hello-world","pull_number":1}},"maxRequests":1,"summary":false}}