scm_merge_pull_request
Request that Ankra merge a pull request automatically once it goes green: the newest pipeline run for its head commit concludes success, any gate step passes, the run executed under approved (not fallback) authority, Ankra's AI review has not requested changes, and no human reviewer has requested changes. Requires the repository's GitHub connection to have Merge when green turned on and to be in Agent mode (both under AI settings, Connections; the connection's mode is not the chat's Ask/Agent switch); a fork pull request is never merged automatically. This tool only records the request (a merge-when-green intent) - it never merges immediately, and the merge itself happens later, asynchronously, once every condition holds. On a repository whose Ankra merge train is on (github_get_pull_request reports merge_train.repository_train), the request puts the pull request on the train once its checks pass, instead of merging it directly: this is how such a pull request gets the required 'Ankra merge train' check, and the train merges it once its tested car passes. A request already pending for the head is not repeated. Requires the exact owner and repo from a prior github_list_repositories call - never guess them - and the pull request's current head_sha.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. Also accepts the combined 'owner/name' form. | |
| owner | Yes | Repository owner (e.g. 'octocat'). Prefer the exact owner from a prior github_list_repositories call. May be embedded in 'repo' as 'owner/name'. | |
| head_sha | Yes | The commit you are asking Ankra to merge when it goes green - the pull request's current head commit SHA. | |
| provider | Yes | Source control provider: 'github', 'gitlab' or 'bitbucket_cloud'. Only GitHub can actually be merged through Ankra today; a request on another provider is refused when the run gate is evaluated. | |
| pull_request_number | Yes | The pull request's number within the repository. |