summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-11-06 08:19:41 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2016-11-06 08:19:41 +0100
commit570e75d5548daa971ff570a634dec0767e3ba6c0 (patch)
treed92bed09e770e3843027e9050164b546903cb0fb /gitlab
parent463893fb085becad96c0353d411b93c41dba2ab2 (diff)
downloadgitlab-570e75d5548daa971ff570a634dec0767e3ba6c0.tar.gz
Add support for templates API
Add gitlab CI and gitignores APIs Rework the templates/license API docs
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/__init__.py2
-rw-r--r--gitlab/objects.py24
2 files changed, 26 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index f91fdf2..3a12629 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -91,6 +91,8 @@ class Gitlab(object):
self.broadcastmessages = BroadcastMessageManager(self)
self.keys = KeyManager(self)
+ self.gitlabciymls = GitlabciymlManager(self)
+ self.gitignores = GitignoreManager(self)
self.groups = GroupManager(self)
self.hooks = HookManager(self)
self.issues = IssueManager(self)
diff --git a/gitlab/objects.py b/gitlab/objects.py
index c47ed47..5166b08 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -811,6 +811,30 @@ class NotificationSettingsManager(BaseManager):
obj_cls = NotificationSettings
+class Gitignore(GitlabObject):
+ _url = '/templates/gitignores'
+ canDelete = False
+ canUpdate = False
+ canCreate = False
+ idAttr = 'name'
+
+
+class GitignoreManager(BaseManager):
+ obj_cls = Gitignore
+
+
+class Gitlabciyml(GitlabObject):
+ _url = '/templates/gitlab_ci_ymls'
+ canDelete = False
+ canUpdate = False
+ canCreate = False
+ idAttr = 'name'
+
+
+class GitlabciymlManager(BaseManager):
+ obj_cls = Gitlabciyml
+
+
class GroupIssue(GitlabObject):
_url = '/groups/%(group_id)s/issues'
canGet = 'from_list'