summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/iterations.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-07-24 23:14:06 +0200
committerJohn Villalovos <john@sodarock.com>2022-07-27 08:29:24 -0700
commit194ee0100c2868c1a9afb161c15f3145efb01c7c (patch)
tree2af6cd63ec2ee357a43accbdbc13342d61f87f24 /gitlab/v4/objects/iterations.py
parent66461ba519a85bfbd3cba284a0c8de11a3ac7cde (diff)
downloadgitlab-194ee0100c2868c1a9afb161c15f3145efb01c7c.tar.gz
feat: add support for iterations API
Diffstat (limited to 'gitlab/v4/objects/iterations.py')
-rw-r--r--gitlab/v4/objects/iterations.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/gitlab/v4/objects/iterations.py b/gitlab/v4/objects/iterations.py
new file mode 100644
index 0000000..30895ff
--- /dev/null
+++ b/gitlab/v4/objects/iterations.py
@@ -0,0 +1,26 @@
+from gitlab.base import RESTManager, RESTObject
+from gitlab.mixins import ListMixin
+
+__all__ = [
+ "ProjectIterationManager",
+ "GroupIteration",
+ "GroupIterationManager",
+]
+
+
+class GroupIteration(RESTObject):
+ _repr_attr = "title"
+
+
+class GroupIterationManager(ListMixin, RESTManager):
+ _path = "/groups/{group_id}/iterations"
+ _obj_cls = GroupIteration
+ _from_parent_attrs = {"group_id": "id"}
+ _list_filters = ("state", "search", "include_ancestors")
+
+
+class ProjectIterationManager(ListMixin, RESTManager):
+ _path = "/projects/{project_id}/iterations"
+ _obj_cls = GroupIteration
+ _from_parent_attrs = {"project_id": "id"}
+ _list_filters = ("state", "search", "include_ancestors")