layout | page_title | description |
---|---|---|
github |
GitHub: repository_branches |
Get information on a Github repository's branches. |
Use this data source to retrieve information about branches in a repository.
data "github_repository_branches" "example" {
repository = "example-repository"
}
-
repository
- (Required) Name of the repository to retrieve the branches from. -
only_protected_branches
- (Optional). If true, thebranches
attributes will be populated only with protected branches. Default:false
. -
only_non_protected_branches
- (Optional). If true, thebranches
attributes will be populated only with non protected branches. Default:false
.
branches
- The list of this repository's branches. Each element ofbranches
has the following attributes:name
- Name of the branch.protected
- Whether the branch is protected.