summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/todos.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-12-01 01:04:53 +0100
committerGitHub <noreply@github.com>2021-12-01 01:04:53 +0100
commit8d76826fa64460e504acc5924f859f8dbc246b42 (patch)
tree083fefada982c795e2415092794db429abb0c184 /gitlab/v4/objects/todos.py
parent5a1678f43184bd459132102cc13cf8426fe0449d (diff)
parent86ab04e54ea4175f10053decfad5086cda7aa024 (diff)
downloadgitlab-master.tar.gz
Merge pull request #1723 from python-gitlab/jlvillal/dead_mastermaster
Close-out `master` branch
Diffstat (limited to 'gitlab/v4/objects/todos.py')
-rw-r--r--gitlab/v4/objects/todos.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/gitlab/v4/objects/todos.py b/gitlab/v4/objects/todos.py
deleted file mode 100644
index de82437..0000000
--- a/gitlab/v4/objects/todos.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from gitlab import cli
-from gitlab import exceptions as exc
-from gitlab.base import RESTManager, RESTObject
-from gitlab.mixins import DeleteMixin, ListMixin, ObjectDeleteMixin
-
-__all__ = [
- "Todo",
- "TodoManager",
-]
-
-
-class Todo(ObjectDeleteMixin, RESTObject):
- @cli.register_custom_action("Todo")
- @exc.on_http_error(exc.GitlabTodoError)
- def mark_as_done(self, **kwargs):
- """Mark the todo as done.
-
- Args:
- **kwargs: Extra options to send to the server (e.g. sudo)
-
- Raises:
- GitlabAuthenticationError: If authentication is not correct
- GitlabTodoError: If the server failed to perform the request
- """
- path = "%s/%s/mark_as_done" % (self.manager.path, self.id)
- server_data = self.manager.gitlab.http_post(path, **kwargs)
- self._update_attrs(server_data)
-
-
-class TodoManager(ListMixin, DeleteMixin, RESTManager):
- _path = "/todos"
- _obj_cls = Todo
- _list_filters = ("action", "author_id", "project_id", "state", "type")
-
- @cli.register_custom_action("TodoManager")
- @exc.on_http_error(exc.GitlabTodoError)
- def mark_all_as_done(self, **kwargs):
- """Mark all the todos as done.
-
- Args:
- **kwargs: Extra options to send to the server (e.g. sudo)
-
- Raises:
- GitlabAuthenticationError: If authentication is not correct
- GitlabTodoError: If the server failed to perform the request
-
- Returns:
- int: The number of todos marked done
- """
- self.gitlab.http_post("/todos/mark_as_done", **kwargs)