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.
Perform a merge
:base
- Required String - The name of the base branch that the
head will be merged into.
:head
- Required String - The head to merge. This can be a
branch name or a commit SHA1.
:commit_message
- Optional String - Commit message to use for
the merge commit. If omitted, a default message will be used.
github = Github.new github.repos.merging.merge 'user', 'repo', "base": "master", "head": "cool_feature", "commit_message": "Shipped cool_feature!"
# File lib/github_api/repos/merging.rb, line 30 def merge(*args) arguments(args, :required => [:user, :repo]) do sift VALID_MERGE_PARAM_NAMES assert_required REQUIRED_MERGE_PARAMS end params = arguments.params post_request("/repos/#{user}/#{repo}/merges", params) end