diff --git a/gitlab/v4/objects/deployments.py b/gitlab/v4/objects/deployments.py index b7a186ca2..6fd875f5b 100644 --- a/gitlab/v4/objects/deployments.py +++ b/gitlab/v4/objects/deployments.py @@ -10,7 +10,14 @@ from gitlab import cli from gitlab import exceptions as exc from gitlab.base import RESTObject -from gitlab.mixins import CreateMixin, RetrieveMixin, SaveMixin, UpdateMixin +from gitlab.mixins import ( + CreateMixin, + DeleteMixin, + ObjectDeleteMixin, + RetrieveMixin, + SaveMixin, + UpdateMixin, +) from gitlab.types import RequiredOptional from .merge_requests import ProjectDeploymentMergeRequestManager # noqa: F401 @@ -18,7 +25,7 @@ __all__ = ["ProjectDeployment", "ProjectDeploymentManager"] -class ProjectDeployment(SaveMixin, RESTObject): +class ProjectDeployment(SaveMixin, ObjectDeleteMixin, RESTObject): mergerequests: ProjectDeploymentMergeRequestManager @cli.register_custom_action( @@ -70,6 +77,7 @@ class ProjectDeploymentManager( RetrieveMixin[ProjectDeployment], CreateMixin[ProjectDeployment], UpdateMixin[ProjectDeployment], + DeleteMixin[ProjectDeployment], ): _path = "/projects/{project_id}/deployments" _obj_cls = ProjectDeployment