Skip to content

Commit 4aeeb7c

Browse files
committed
Add label listing and adding functionality
1 parent 9d12a0f commit 4aeeb7c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

gitlab3/_api_definition.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,19 @@ class Hook(APIDefinition):
223223
'url',
224224
]
225225

226+
class Label(APIDefinition):
227+
url = '/labels'
228+
# _DELETE requires ?id=:id which isn't something that works yet.
229+
actions = [ _LIST, _ADD ]
230+
required_params = [
231+
'name',
232+
'color',
233+
]
234+
optional_params = [
235+
'description',
236+
'priority',
237+
]
238+
226239
class Issue(APIDefinition):
227240
url = '/issues/:issue_id'
228241
actions = [ _LIST, _GET, _ADD, _EDIT ]
@@ -381,6 +394,7 @@ def name(cls):
381394
DeployKey,
382395
Event,
383396
Hook,
397+
Label,
384398
Issue,
385399
Member,
386400
MergeRequest,

0 commit comments

Comments
 (0)