GitHub · Capability
GitHub Repos API — Branches
GitHub Repos API — Branches. 21 operations. Lead operation: List Branches. Self-contained Naftiko capability covering one Github business surface.
What You Can Do
GET
Listbranches
— List Branches
/v1/repos/{owner}/{repo}/branches
GET
Getbranch
— Get Branch
/v1/repos/{owner}/{repo}/branches/{branch}
GET
Getbranchprotection
— Get Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection
PUT
Updatebranchprotection
— Update Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection
DELETE
Deletebranchprotection
— Delete Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection
GET
Getadminbranchprotection
— Get Admin Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection/enforce-admins
POST
Setadminbranchprotection
— Set Admin Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection/enforce-admins
DELETE
Deleteadminbranchprotection
— Delete Admin Branch Protection
/v1/repos/{owner}/{repo}/branches/{branch}/protection/enforce-admins
GET
Getappswithaccesstotheprotectedbranch
— Get Apps With Access To The Protected Branch
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps
GET
Getteamswithaccesstotheprotectedbranch
— Get Teams With Access To The Protected Branch
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams
GET
Getuserswithaccesstotheprotectedbranch
— Get Users With Access To The Protected Branch
/v1/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users
POST
Renamebranch
— Rename Branch
/v1/repos/{owner}/{repo}/branches/{branch}/rename
GET
Listbranchesforheadcommit
— List Branches For Head Commit
/v1/repos/{owner}/{repo}/commits/{commit-sha}/branches-where-head
GET
Listdeploymentbranchpolicies
— List Deployment Branch Policies
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies
POST
Createdeploymentbranchpolicy
— Create Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies
GET
Getdeploymentbranchpolicy
— Get Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}
PUT
Updatedeploymentbranchpolicy
— Update Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}
DELETE
Deletedeploymentbranchpolicy
— Delete Deployment Branch Policy
/v1/repos/{owner}/{repo}/environments/{environment-name}/deployment-branch-policies/{branch-policy-id}
POST
Syncforkbranchwiththeupstreamrepository
— Sync Fork Branch With The Upstream Repository
/v1/repos/{owner}/{repo}/merge-upstream
POST
Mergebranch
— Merge Branch
/v1/repos/{owner}/{repo}/merges
PUT
Updatepullrequestbranch
— Update Pull Request Branch
/v1/repos/{owner}/{repo}/pulls/{pull-number}/update-branch
MCP Tools
list-branches
List Branches
read-only
idempotent
get-branch
Get Branch
read-only
idempotent
get-branch-protection
Get Branch Protection
read-only
idempotent
update-branch-protection
Update Branch Protection
idempotent
delete-branch-protection
Delete Branch Protection
idempotent
get-admin-branch-protection
Get Admin Branch Protection
read-only
idempotent
set-admin-branch-protection
Set Admin Branch Protection
delete-admin-branch-protection
Delete Admin Branch Protection
idempotent
get-apps-access-protected-branch
Get Apps With Access To The Protected Branch
read-only
idempotent
get-teams-access-protected-branch
Get Teams With Access To The Protected Branch
read-only
idempotent
get-users-access-protected-branch
Get Users With Access To The Protected Branch
read-only
idempotent
rename-branch
Rename Branch
list-branches-head-commit
List Branches For Head Commit
read-only
idempotent
list-deployment-branch-policies
List Deployment Branch Policies
read-only
idempotent
create-deployment-branch-policy
Create Deployment Branch Policy
get-deployment-branch-policy
Get Deployment Branch Policy
read-only
idempotent
update-deployment-branch-policy
Update Deployment Branch Policy
idempotent
delete-deployment-branch-policy
Delete Deployment Branch Policy
idempotent
sync-fork-branch-upstream-repository
Sync Fork Branch With The Upstream Repository
merge-branch
Merge Branch
update-pull-request-branch
Update Pull Request Branch
idempotent