summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/releases.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-06-26 22:32:41 +0200
committerGitHub <noreply@github.com>2021-06-26 22:32:41 +0200
commit33d342818599f403434e7024097449b6f21babc0 (patch)
treeb72e149f518bbf1feb5d75d4d64eee27c9a6cc40 /gitlab/v4/objects/releases.py
parent2c86003b36b443203c881dbcefb0ae3908ea1e34 (diff)
parent13bf61d07e84cd719931234c3ccbb9977c8f6416 (diff)
downloadgitlab-33d342818599f403434e7024097449b6f21babc0.tar.gz
Merge pull request #1522 from PPaques/1521-releases-edit
Support Release Update API
Diffstat (limited to 'gitlab/v4/objects/releases.py')
-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):