Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.42 KB

listBranches.md

File metadata and controls

57 lines (42 loc) · 1.42 KB
name example route scope type
List branches
octokit.rest.repos.listBranches({ owner, repo })
GET /repos/{owner}/{repo}/branches
repos
API method

List branches

octokit.rest.repos.listBranches({
  owner,
  repo,
});

Parameters

name required description
owneryes

The account owner of the repository. The name is not case sensitive.

repoyes

The name of the repository without the .git extension. The name is not case sensitive.

protectedno

Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.

per_pageno

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

pageno

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

See also: GitHub Developer Guide documentation.