Skip to content

Commit 42d678c

Browse files
author
Torben Hørup
committed
feat: allow deletion of deployments
closes: #3464
1 parent bb9ea1b commit 42d678c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎gitlab/v4/objects/deployments.py‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@
1010
from gitlab import cli
1111
from gitlab import exceptions as exc
1212
from gitlab.base import RESTObject
13-
from gitlab.mixins import CreateMixin, RetrieveMixin, SaveMixin, UpdateMixin
13+
from gitlab.mixins import (
14+
CreateMixin,
15+
DeleteMixin,
16+
ObjectDeleteMixin,
17+
RetrieveMixin,
18+
SaveMixin,
19+
UpdateMixin,
20+
)
1421
from gitlab.types import RequiredOptional
1522

1623
from .merge_requests import ProjectDeploymentMergeRequestManager # noqa: F401
1724

1825
__all__ = ["ProjectDeployment", "ProjectDeploymentManager"]
1926

2027

21-
class ProjectDeployment(SaveMixin, RESTObject):
28+
class ProjectDeployment(SaveMixin, ObjectDeleteMixin, RESTObject):
2229
mergerequests: ProjectDeploymentMergeRequestManager
2330

2431
@cli.register_custom_action(
@@ -70,6 +77,7 @@ class ProjectDeploymentManager(
7077
RetrieveMixin[ProjectDeployment],
7178
CreateMixin[ProjectDeployment],
7279
UpdateMixin[ProjectDeployment],
80+
DeleteMixin[ProjectDeployment],
7381
):
7482
_path = "/projects/{project_id}/deployments"
7583
_obj_cls = ProjectDeployment

0 commit comments

Comments
 (0)