summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-08-23 20:56:26 -0700
committerJohn L. Villalovos <john@sodarock.com>2022-08-25 07:57:02 -0700
commit9c9eeb901b1f3acd3fb0c4f24014ae2ed7c975ec (patch)
tree2227bdfce32af418e5342bb66fc2f758528e7c00 /docs
parente095735e02867f433fdff388212785379d43b89b (diff)
downloadgitlab-9c9eeb901b1f3acd3fb0c4f24014ae2ed7c975ec.tar.gz
feat: add support for deployment approval endpoint
Add support for the deployment approval endpoint[1] [1] https://docs.gitlab.com/ee/api/deployments.html#approve-or-reject-a-blocked-deployment Closes: #2253
Diffstat (limited to 'docs')
-rw-r--r--docs/gl_objects/deployments.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/gl_objects/deployments.rst b/docs/gl_objects/deployments.rst
index ae10103..9c810ce 100644
--- a/docs/gl_objects/deployments.rst
+++ b/docs/gl_objects/deployments.rst
@@ -40,6 +40,18 @@ Update a deployment::
deployment.status = "failed"
deployment.save()
+Approve a deployment::
+
+ deployment = project.deployments.get(42)
+ # `status` must be either "approved" or "rejected".
+ deployment.approval(status="approved")
+
+Reject a deployment::
+
+ deployment = project.deployments.get(42)
+ # Using the optional `comment` and `represented_as` arguments
+ deployment.approval(status="rejected", comment="Fails CI", represented_as="security")
+
Merge requests associated with a deployment
===========================================