Search + K

Command Palette

Search for a command to run...

Sign In

Create a commit status

POST /repos/{owner}/{repo}/statuses/{sha}
Copy endpoint
https://api.github.com

Users with push access in a repository can create commit statuses for a given SHA.

Note: there is a limit of 1000 statuses per sha and context within a repository. Attempts to create more than 1000 statuses will result in a validation error.

Parameters

path Path Parameters

Name Type
owner required

The account owner of the repository. The name is not case sensitive.

string
repo required

The name of the repository without the .git extension. The name is not case sensitive.

string
sha required
string

Request Body

application/json required
{
state: "error" | "failure" | "pending" | "success";
target_url?: string | null;
description?: string | null;
context?: string;
}

Responses

201 application/json

Response

interface Status {
url: string;
avatar_url: string | null;
id: number;
node_id: string;
state: string;
description: string | null;
target_url: string | null;
context: string;
created_at: string;
updated_at: string;
creator: SimpleUser

A GitHub user.

interface SimpleUser {
name?: string | null;
email?: string | null;
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string | null;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
starred_at?: string;
user_view_type?: string;
}
| null
;
}