Skip to main content

List Branches

List branches.

External Documentation

To learn more, visit the GitHub documentation.

Parameters

ParameterDescription
OwnerThe organization or person who owns the repository. github.com/{owner}/{repo}
PagePage number of the results to fetch.
Per PageThe number of results per page (max 100).
RepoName of the repository owned by the owner. github.com/{owner}/{repo}
Return All PagesAutomatically fetch all resources, page by page.

Example Output

{
"value": [
{
"commit": {
"sha": "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
"url": "https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
},
"name": "master",
"protected": true,
"protection": {
"required_status_checks": {
"contexts": [
"ci-test",
"linter"
],
"enforcement_level": "non_admins"
}
},
"protection_url": "https://api.github.com/repos/octocat/hello-world/branches/master/protection"
}
]
}

Workflow Library Example

List Branches with Github and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop