v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

List a repository's branches

get/repos/{owner}/{repo}/branches

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

Query parameters

pageinteger

page number of results to return (1-based)

limitinteger

page size of results

qstring

branch name substring to filter by

Response

BranchList

effective_branch_protection_namestring

EffectiveBranchProtectionName is the name of the effective branch protection rule

enable_status_checkboolean

EnableStatusCheck indicates if status checks are enabled

namestring

Name is the branch name

protectedboolean

Protected indicates if the branch is protected

required_approvalsinteger

RequiredApprovals is the number of required approvals for pull requests

status_check_contextsstring[]

StatusCheckContexts contains the list of required status check contexts

user_can_mergeboolean

UserCanMerge indicates if the current user can merge to this branch

user_can_pushboolean

UserCanPush indicates if the current user can push to this branch