Get a commit's statuses, by branch/tag/commit reference
const url = 'https://gitea.com/api/v1/repos/example/example/commits/example/statuses?sort=oldest&state=pending';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://gitea.com/api/v1/repos/example/example/commits/example/statuses?sort=oldest&state=pending' \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Name of branch/tag/commit
Query Parameters
Section titled “Query Parameters”Type of sort
Type of state
Page number of results to return (1-based)
Page size of results
Responses
Section titled “Responses”CommitStatusList
CommitStatus holds a single status of a single Commit
object
Context is the unique context identifier for the status
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate
The user’s website
Description provides a brief description of the status
ID is the unique identifier for the commit status
State represents the status state (pending, success, error, failure) pending CommitStatusPending is for when the CommitStatus is Pending success CommitStatusSuccess is for when the CommitStatus is Success error CommitStatusError is for when the CommitStatus is Error failure CommitStatusFailure is for when the CommitStatus is Failure warning CommitStatusWarning is for when the CommitStatus is Warning skipped CommitStatusSkipped is for when CommitStatus is Skipped
TargetURL is the URL to link to for more details
URL is the API URL for this status
Example
[ { "creator": { "login_name": "empty", "visibility": "public" }, "status": "pending" }]APIError is error format response
Headers
Section titled “Headers”APINotFound is a not found empty response