POST
/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_ruleReview custom deployment protection rules
Submits an approval or rejection for a custom deployment protection rule associated with a workflow run. Provide environment_name and either a comment or a state of approved or rejected, depending on the review form you use. GitHub Apps can review only their own custom deployment protection rules; use POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments for reviews assigned to a person or team.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
run_idintegerrequired
The unique integer identifier of the workflow run to review.
A review for a custom deployment protection rule, using either a comment-only form or an approval or rejection form.
environment_namestringrequired
The name of the environment to approve or reject.
commentstringrequired
Comment associated with the pending deployment protection rule. **Required when state is not provided.**
204Returns no content after the custom deployment protection rule review is submitted.
Error handling
environment_name is required in every request. The body must match one of two forms: include comment when state is omitted, or include state set to approved or rejected; comment is optional in the latter form.