6
6
Welcome to pyapi-gitlab's documentation!
7
7
=========================================
8
8
9
-
10
9
pyapi-gitlab is a wrapper to access all the functions of Gitlab from our python scripts.
11
10
12
11
13
-
14
12
How to use it
15
13
==================
16
14
@@ -205,6 +203,10 @@ Please note that Gitlab 5 doesn't have this option and using it will probably en
205
203
merge_requests_enabled=0, wiki_enabled=0,
206
204
snippets_enabled=0, public=0)
207
205
206
+ Delete a project::
207
+
208
+ git.deleteproject(project_id)
209
+
208
210
List project members::
209
211
210
212
git.listprojectmembers(project_id)
@@ -347,11 +349,28 @@ Groups
347
349
348
350
Create a group::
349
351
350
- def creategroup(self, name, path):
352
+ git.creategroup(self, name, path):
353
+
354
+ Delete a group::
355
+
356
+ git.deletegroup(group_id)
351
357
352
358
Get a group. If none are specified returns all the groups::
353
359
354
- def getgroups(self, id_=None):
360
+ git.getgroups(self, id_=None):
361
+
362
+ List group members::
363
+
364
+ git.listgroupmembers(group_id)
365
+
366
+ Add a member to a group::
367
+
368
+ git.addgroupmember(group_id, user_id, access_level, sudo="")
369
+
370
+ Delete a member from a group::
371
+
372
+ git.deletegroupmember(group_id, user_id)
373
+
355
374
356
375
Merge support
357
376
==============
@@ -447,6 +466,58 @@ Get the raw blob from a project file::
447
466
448
467
git.getrawblob(project_id, sha1, path)
449
468
469
+
470
+ Notes (from projects, issues, snippets)
471
+ =======================================
472
+ Get a project wall notes::
473
+
474
+ git.getprojectwallnotes(project_id)
475
+
476
+ Get one specific wall note from a project::
477
+
478
+ git.getprojectwallnote(project_id, note_id)
479
+
480
+ Create a wall note for a project::
481
+
482
+ git.createprojectwallnote(project_id, content)
483
+
484
+ Get all the notes from an issue wall::
485
+
486
+ git.getissuewallnotes(project_id, issued_id)
487
+
488
+ Get one note from an issue wall::
489
+
490
+ git.getissuewallnote(project_id, issue_id, note_id)
491
+
492
+ Create a note in the wall of an issue::
493
+
494
+ git.createissuewallnote(project_id, issue_id, content)
495
+
496
+
497
+ Get all the notes from a snippet wall::
498
+
499
+ git.getsnippetwallnotes(project_id, snippet_id)
500
+
501
+ Get one note from a snippet wall::
502
+
503
+ git.getsnippetwallnote(project_id, snippet_id, note_id)
504
+
505
+ Create a note in the wall of a snippet::
506
+
507
+ git.createsnippetewallnote(project_id, snippet_id, content)
508
+
509
+ Get all the notes from a merge request wall::
510
+
511
+ git.getmergerequestwallnotes(project_id, merge_request_id)
512
+
513
+ Get one note from a merge request wall::
514
+
515
+ git.getmergerequestwallnote(project_id, merge_request_id, note_id)
516
+
517
+ Creat a note in the wall of a merge request::
518
+
519
+ git.createmergerequestewallnote(project_id, merge_request_id, content)
520
+
450
521
Examples
451
522
=========
452
523
@@ -464,3 +535,4 @@ accessing the commit you want and using the key 'id' like this::
464
535
In turn the whole thing (that is, if you know which commit number you need) would turn like this::
465
536
466
537
git.listrepositorycommit(2, self.git.listrepositorycommits(2)[0]['id'])
538
+
0 commit comments