Merge a Change (repo_id addressing)
Accepted credentials: User token, Plugin installation token.
Use an own-account bearer token (including supported service accounts) or a Core-issued plugin installation bearer token, subject to the permissions and restrictions below. Plugin assertion JWTs and plugin OAuth user-delegation tokens are not accepted here.
Requires live repository push permission (contents:write for plugin installations). Accounts and automation principals may call it; a plugin installation’s writes are credited to the installation, so refreshed tokens keep authorship. Trails must be enabled. Send requests to the repository’s primary API region. Merge additionally enforces current merge policy, gates and any bypass authorization.
Path Parameters
Body
Response
OK
Why the native Trail's working branch was kept. Set only when branchDeleted is false; omitted for a GitHub-backed Trail. not_requested: the request sent deleteBranch false. disabled: deleteBranch was omitted and the repository's deleteBranchOnMerge setting is off. base: the branch is the base the Trail's merge recorded. stacked: an open or draft Trail based on the branch could not be moved to the merged Trail's base. claimed: another Trail took the branch name after the merge. moved: the branch moved past the merged head. protected: branch protection refused the delete. default_branch: the branch is the repository's default branch. failed: the delete, or moving the Trails based on the branch, could not run or did not succeed.
not_requested, disabled, base, stacked, claimed, moved, protected, default_branch, failed Branch the merge landed on, without refs/heads/: for a stacked GitHub pull request, the stack's base rather than the Trail's own base, unless GitHub reported the merge first, in which case the base it reported. Omitted when the destination is unknown or the merge record could not be read.