Todos¶
Use Todo objects to manipulate todos. The
gitlab.Gitlab.todos manager object provides helper functions.
Examples¶
List active todos:
todos = gl.todos.list()
You can filter the list using the following parameters:
action: can beassigned,mentioned,build_failed,marked, orapproval_requiredauthor_idproject_idstate: can bependingordonetype: can beIssueorMergeRequest
For example:
todos = gl.todos.list(project_id=1)
todos = gl.todos.list(state='done', type='Issue')
Get a single todo:
todo = gl.todos.get(todo_id)
Mark a todo as done:
gl.todos.delete(todo_id)
# or
todo.delete()
Mark all the todos as done:
nb_of_closed_todos = gl.todos.delete_all()