Github API

Getting access, Developing, Testing

Back to Github

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.

GitHub Apps must have read and write permission for Deployments to use this endpoint.

Input

type: object properties: parameters: type: object properties: owner: type: string description: The account owner of the repository. The name is not case sensitive. repo: type: string description: The name of the repository. The name is not case sensitive. run_id: type: integer description: The unique identifier of the workflow run. required: - owner - repo - run_id title: Parameters data: anyOf: - type: object properties: environment_name: type: string description: The name of the environment to approve or reject. comment: type: string description: >- Comment associated with the pending deployment protection rule. **Required when state is not provided.** required: - environment_name - comment - type: object properties: environment_name: type: string description: The name of the environment to approve or reject. state: type: string description: >- Whether to approve or reject deployment to the specified environments. enum: - approved - rejected comment: type: string description: Optional comment to include with the review. required: - environment_name - state title: Data