Review custom deployment protection rules for a workflow run
Approve or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see “Using environments for deployment.”
[!NOTE] GitHub Apps can only review their own custom deployment protection rules. To approve or reject pending deployments that are waiting for review from a specific person or team, see
POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
The unique identifier of the workflow run.
Request Body required
Section titled “ Request Body required ”object
The name of the environment to approve or reject.
Comment associated with the pending deployment protection rule. Required when state is not provided.
object
The name of the environment to approve or reject.
Whether to approve or reject deployment to the specified environments.
Optional comment to include with the review.
Examples
{ "environment_name": "prod-eus", "state": "approved", "comment": "All health checks passed."}Responses
Section titled “ Responses ”Response