summaryrefslogtreecommitdiff
path: root/docs/gl_objects/issues.rst
blob: d4cbf003d5850b7b4f3f787f80a6dcc0d2059723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
######
Issues
######

Reported issues
===============

Use :class:`~gitlab.objects.Issues` objects to manipulate issues the
authenticated user reported. The :attr:`gitlab.Gitlab.issues` manager object
provides helper functions.

Examples
--------

List the issues:

.. literalinclude:: issues.py
   :start-after: # list
   :end-before: # end list

Use the ``state`` and ``label`` parameters to filter the results. Use the
``order_by`` and ``sort`` attributes to sort the results:

.. literalinclude:: issues.py
   :start-after: # filtered list
   :end-before: # end filtered list

Group issues
============

Use :class:`~gitlab.objects.GroupIssue` objects to manipulate issues. The
:attr:`gitlab.Gitlab.project_issues` and :attr:`Group.issues
<gitlab.objects.Group.issues>` manager objects provide helper functions.

Examples
--------

List the group issues:

.. literalinclude:: issues.py
   :start-after: # group issues list
   :end-before: # end group issues list

Project issues
==============

Use :class:`~gitlab.objects.ProjectIssue` objects to manipulate issues. The
:attr:`gitlab.Gitlab.project_issues` and :attr:`Project.issues
<gitlab.objects.Project.issues>` manager objects provide helper functions.

Examples
--------

List the project issues:

.. literalinclude:: issues.py
   :start-after: # project issues list
   :end-before: # end project issues list

Get a project issue:

.. literalinclude:: issues.py
   :start-after: # project issues get
   :end-before: # end project issues get

Create a new issue:

.. literalinclude:: issues.py
   :start-after: # project issues create
   :end-before: # end project issues create

Update an issue:

.. literalinclude:: issues.py
   :start-after: # project issue update
   :end-before: # end project issue update

Close / reopen an issue:

.. literalinclude:: issues.py
   :start-after: # project issue open_close
   :end-before: # end project issue open_close

Delete an issue:

.. literalinclude:: issues.py
   :start-after: # project issue delete
   :end-before: # end project issue delete

Subscribe / unsubscribe from an issue:

.. literalinclude:: issues.py
   :start-after: # project issue subscribe
   :end-before: # end project issue subscribe

Move an issue to another project:

.. literalinclude:: issues.py
   :start-after: # project issue move
   :end-before: # end project issue move

Make an issue as todo:

.. literalinclude:: issues.py
   :start-after: # project issue todo
   :end-before: # end project issue todo