Skip to content

Commit b4c4787

Browse files
committed
feat(release): allow to update release
Release API now supports PUT.
1 parent 2c86003 commit b4c4787

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

gitlab/v4/objects/releases.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from gitlab.base import RequiredOptional, RESTManager, RESTObject
2-
from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin
2+
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
33

44
__all__ = [
55
"ProjectRelease",
@@ -9,18 +9,21 @@
99
]
1010

1111

12-
class ProjectRelease(RESTObject):
12+
class ProjectRelease(SaveMixin, RESTObject):
1313
_id_attr = "tag_name"
1414
_managers = (("links", "ProjectReleaseLinkManager"),)
1515

1616

17-
class ProjectReleaseManager(NoUpdateMixin, RESTManager):
17+
class ProjectReleaseManager(CRUDMixin, RESTManager):
1818
_path = "/projects/%(project_id)s/releases"
1919
_obj_cls = ProjectRelease
2020
_from_parent_attrs = {"project_id": "id"}
2121
_create_attrs = RequiredOptional(
2222
required=("name", "tag_name", "description"), optional=("ref", "assets")
2323
)
24+
_update_attrs = RequiredOptional(
25+
optional=("name", "description", "milestones", "released_at")
26+
)
2427

2528

2629
class ProjectReleaseLink(ObjectDeleteMixin, SaveMixin, RESTObject):

0 commit comments

Comments
 (0)