Merging

The Repo Merging API supports merging branches in a repository. This accomplishes
essentially the same thing as merging one branch into another in a local repository
and then pushing to GitHub. The benefit is that the merge is done on the server side
and a local repository is not needed. This makes it more appropriate for automation
and other tools where maintaining local repositories would be cumbersome and inefficient.

The authenticated user will be the author of any merges done through this endpoint.

Perform a merge

POST /repos/:owner/:repo/merges

Input

Name

Type

Description

base

string

Required. The name of the base branch that the head will be merged into.

head

string

Required. The head to merge. This can be a branch name or a commit SHA1.

commit_message

string

Commit message to use for the merge commit. If omitted, a default message will be used.