Skip to main content

status_combined

Creates, updates, deletes, gets or lists a status_combined resource.

Overview

Namestatus_combined
TypeResource
Idgithub.repos.status_combined

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
commit_urlstring (uri)
repositoryobjectMinimal Repository (title: Minimal Repository)
shastring
statestring
statusesarray
total_countinteger
urlstring (uri)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_combined_status_for_refselectowner, repo, refper_page, pageUsers with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.


Additionally, a combined state is returned. The state is one of:

* failure if any of the contexts report as error or failure
* pending if there are no statuses or a context is pending
* success if the latest status for all contexts is success

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
refstringThe commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME). For more information, see "Git References" in the Git documentation.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.


Additionally, a combined state is returned. The state is one of:

* failure if any of the contexts report as error or failure
* pending if there are no statuses or a context is pending
* success if the latest status for all contexts is success

SELECT
commit_url,
repository,
sha,
state,
statuses,
total_count,
url
FROM github.repos.status_combined
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND ref = '{{ ref }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;