summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Paques <pierre.paques@yamabiko.eu>2021-06-15 21:21:04 +0200
committerPierre Paques <pierre.paques@yamabiko.eu>2021-06-26 21:03:48 +0200
commitb4c4787af54d9db6c1f9e61154be5db9d46de3dd (patch)
treef0c9f76b1df26e509c3e25a297fef68dfc4a732c
parent2c86003b36b443203c881dbcefb0ae3908ea1e34 (diff)
downloadgitlab-b4c4787af54d9db6c1f9e61154be5db9d46de3dd.tar.gz
feat(release): allow to update release
Release API now supports PUT.
-rw-r--r--gitlab/v4/objects/releases.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gitlab/v4/objects/releases.py b/gitlab/v4/objects/releases.py
index ab490dd..6216e45 100644
--- a/gitlab/v4/objects/releases.py
+++ b/gitlab/v4/objects/releases.py
@@ -1,5 +1,5 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
-from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin
+from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
__all__ = [
"ProjectRelease",
@@ -9,18 +9,21 @@ __all__ = [
]
-class ProjectRelease(RESTObject):
+class ProjectRelease(SaveMixin, RESTObject):
_id_attr = "tag_name"
_managers = (("links", "ProjectReleaseLinkManager"),)
-class ProjectReleaseManager(NoUpdateMixin, RESTManager):
+class ProjectReleaseManager(CRUDMixin, RESTManager):
_path = "/projects/%(project_id)s/releases"
_obj_cls = ProjectRelease
_from_parent_attrs = {"project_id": "id"}
_create_attrs = RequiredOptional(
required=("name", "tag_name", "description"), optional=("ref", "assets")
)
+ _update_attrs = RequiredOptional(
+ optional=("name", "description", "milestones", "released_at")
+ )
class ProjectReleaseLink(ObjectDeleteMixin, SaveMixin, RESTObject):