summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorOleksii Shkurupii <Oleksii.Shkurupii@playtech.com>2020-08-26 13:37:03 +0300
committerOleksii Shkurupii <Oleksii.Shkurupii@playtech.com>2020-08-26 15:13:08 +0300
commit88f8cc78f97156d5888a9600bdb8721720563120 (patch)
tree78e1d318810028d57b8d558116e6bbef76efa602 /gitlab/v4/objects.py
parente2dc9ece1a0af37073c41bfa8161fcec5fa01234 (diff)
downloadgitlab-88f8cc78f97156d5888a9600bdb8721720563120.tar.gz
feat: add support to resource milestone events
Fixes #1154
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 2f3e8a5..16efc39 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -2654,6 +2654,16 @@ class ProjectIssueResourceLabelEventManager(RetrieveMixin, RESTManager):
_from_parent_attrs = {"project_id": "project_id", "issue_iid": "iid"}
+class ProjectIssueResourceMilestoneEvent(RESTObject):
+ pass
+
+
+class ProjectIssueResourceMilestoneEventManager(RetrieveMixin, RESTManager):
+ _path = "/projects/%(project_id)s/issues/%(issue_iid)s/resource_milestone_events"
+ _obj_cls = ProjectIssueResourceMilestoneEvent
+ _from_parent_attrs = {"project_id": "project_id", "issue_iid": "iid"}
+
+
class ProjectIssue(
UserAgentDetailMixin,
SubscribableMixin,
@@ -2672,6 +2682,7 @@ class ProjectIssue(
("links", "ProjectIssueLinkManager"),
("notes", "ProjectIssueNoteManager"),
("resourcelabelevents", "ProjectIssueResourceLabelEventManager"),
+ ("resourcemilestoneevents", "ProjectIssueResourceMilestoneEventManager"),
)
@cli.register_custom_action("ProjectIssue", ("to_project_id",))
@@ -3065,6 +3076,18 @@ class ProjectMergeRequestResourceLabelEventManager(RetrieveMixin, RESTManager):
_from_parent_attrs = {"project_id": "project_id", "mr_iid": "iid"}
+class ProjectMergeRequestResourceMilestoneEvent(RESTObject):
+ pass
+
+
+class ProjectMergeRequestResourceMilestoneEventManager(RetrieveMixin, RESTManager):
+ _path = (
+ "/projects/%(project_id)s/merge_requests/%(mr_iid)s/resource_milestone_events"
+ )
+ _obj_cls = ProjectMergeRequestResourceMilestoneEvent
+ _from_parent_attrs = {"project_id": "project_id", "mr_iid": "iid"}
+
+
class ProjectMergeRequest(
SubscribableMixin,
TodoMixin,
@@ -3083,6 +3106,7 @@ class ProjectMergeRequest(
("discussions", "ProjectMergeRequestDiscussionManager"),
("notes", "ProjectMergeRequestNoteManager"),
("resourcelabelevents", "ProjectMergeRequestResourceLabelEventManager"),
+ ("resourcemilestoneevents", "ProjectMergeRequestResourceMilestoneEventManager"),
)
@cli.register_custom_action("ProjectMergeRequest")