branch
Overview
Name | branch |
Type | Resource |
Id | github.repos.branch |
Fields
Name | Datatype | Description |
---|---|---|
name | string | |
_links | object | |
commit | object | Commit |
pattern | string | |
protected | boolean | |
protection | object | Branch Protection |
protection_url | string | |
required_approving_review_count | integer |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_branch | SELECT | branch, owner, repo | |
merge | EXEC | owner, repo, data__base, data__head | |
merge_upstream | EXEC | owner, repo, data__branch | Sync a branch of a forked repository to keep it up-to-date with the upstream repository. |
rename_branch | EXEC | branch, owner, repo, data__new_name | Renames a branch in a repository. Note: Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "Renaming a branch". The permissions required to use this endpoint depends on whether you are renaming the default branch. To rename a non-default branch: Users must have push access. GitHub Apps must have the contents:write repository permission.To rename the default branch: Users must have admin or owner permissions. GitHub Apps must have the administration:write repository permission. |