provider repos POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
@utdk/github /repos/{owner}/{repo}/deployments/{deployment_id}/statuses
Create a deployment status
Users with `push` access can create deployment statuses for a given deployment. OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint.
owner path required
The account owner of the repository. The name is not case sensitive.
string
repo path required
The name of the repository without the `.git` extension. The name is not case sensitive.
string
deployment_id path required
deployment_id parameter
integer

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

repos.createDeploymentStatus
POST/repos/{owner}/{repo}/deployments/{deployment_id}/statuses
Users with `push` access can create deployment statuses for a given deployment. OAuth app tokens and personal access tokens (classic) need the `repo_deployment` scope to use this endpoint.

Parameters

required

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

required

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

required

deployment_id parameter

Input

required

The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub.

The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. > [!NOTE] > It's recommended to use the `log_url` parameter, which replaces `target_url`.

The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""`

A short description of the status. The maximum description length is 140 characters.

Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. If not defined, the environment of the previous status on the deployment will be used, if it exists. Otherwise, the environment of the deployment will be used.

Sets the URL for accessing your environment. Default: `""`

Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true`

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.repos.createDeploymentStatus()