Branches
A list of branches.
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Attributes
Name | Type | Description |
---|---|---|
branches | [Branch] | List of branches. |
Collection Items
Each entry in the branches array has the following attributes:
Name | Type | Description |
---|---|---|
name | String | Name of the git branch. |
repository | Repository | GitHub user or organization the branch belongs to. |
default_branch | Boolean | Whether or not this is the resposiotry's default branch. |
exists_on_github | Boolean | Whether or not the branch still exists on GitHub. |
last_build | Build | Last build on the branch. |
recent_builds | [Build] | Last 10 builds on the branch (when `include=branch.recent_builds` is used). |
Actions
Find
This will return a list of branches a repository has on GitHub.
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|---|---|
branch.exists_on_github | [Boolean] | Filters branches by whether or not the branch still exists on GitHub. |
branch.name | [String] | Filters branches by name of the git branch. |
exists_on_github | [Boolean] | Alias for branch.exists_on_github. |
include | [String] | List of attributes to eager load. |
limit | Integer | How many branches to include in the response. Used for pagination. |
name | [String] | Alias for branch.name. |
offset | Integer | How many branches to skip before the first entry in the response. Used for pagination. |
sort_by | [String] | Attributes to sort branches by. Used for pagination. |
Sortable by: name, last_build, exists_on_github, default_branch, append :desc to any attribute to reverse order.
The default value is default_branch,exists_on_github,last_build:desc.
Template Variable | Type | Description |
---|---|---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Query Parameter | Type | Description |
---|---|---|
branch.exists_on_github | [Boolean] | Filters branches by whether or not the branch still exists on GitHub. |
branch.name | [String] | Filters branches by name of the git branch. |
exists_on_github | [Boolean] | Alias for branch.exists_on_github. |
include | [String] | List of attributes to eager load. |
limit | Integer | How many branches to include in the response. Used for pagination. |
name | [String] | Alias for branch.name. |
offset | Integer | How many branches to skip before the first entry in the response. Used for pagination. |
sort_by | [String] | Attributes to sort branches by. Used for pagination. |
Sortable by: name, last_build, exists_on_github, default_branch, append :desc to any attribute to reverse order.
The default value is default_branch,exists_on_github,last_build:desc.
Template Variable | Type | Description |
---|---|---|
repository.id | Integer | Value uniquely identifying the repository. |
Query Parameter | Type | Description |
---|---|---|
branch.exists_on_github | [Boolean] | Filters branches by whether or not the branch still exists on GitHub. |
branch.name | [String] | Filters branches by name of the git branch. |
exists_on_github | [Boolean] | Alias for branch.exists_on_github. |
include | [String] | List of attributes to eager load. |
limit | Integer | How many branches to include in the response. Used for pagination. |
name | [String] | Alias for branch.name. |
offset | Integer | How many branches to skip before the first entry in the response. Used for pagination. |
sort_by | [String] | Attributes to sort branches by. Used for pagination. |
Example:GET /repo/891/branches?limit=5&exists_on_github=true
Sortable by: name, last_build, exists_on_github, default_branch, append :desc to any attribute to reverse order.
The default value is default_branch,exists_on_github,last_build:desc.
Template Variable | Type | Description |
---|---|---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
Query Parameter | Type | Description |
---|---|---|
branch.exists_on_github | [Boolean] | Filters branches by whether or not the branch still exists on GitHub. |
branch.name | [String] | Filters branches by name of the git branch. |
exists_on_github | [Boolean] | Alias for branch.exists_on_github. |
include | [String] | List of attributes to eager load. |
limit | Integer | How many branches to include in the response. Used for pagination. |
name | [String] | Alias for branch.name. |
offset | Integer | How many branches to skip before the first entry in the response. Used for pagination. |
sort_by | [String] | Attributes to sort branches by. Used for pagination. |
Example:GET /repo/rails%2Frails/branches?limit=5&exists_on_github=true
Sortable by: name, last_build, exists_on_github, default_branch, append :desc to any attribute to reverse order.
The default value is default_branch,exists_on_github,last_build:desc.