Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42bef0a

Browse files
author
Gauvain Pocentek
committed
support for system hooks
1 parentaf84700 commit42bef0a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

‎gitlab.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,19 @@ def _getListOrObject(self, cls, id, **kwargs):
264264
else:
265265
returncls(self,id,**kwargs)
266266

267+
defHook(self,id=None,**kwargs):
268+
"""Creates/tests/lists system hook(s) known by the GitLab server.
269+
270+
If id is None, returns a list of hooks.
271+
272+
If id is an integer, test the matching hook.
273+
274+
If id is a dict, create a new object using attributes provided. The
275+
object is NOT saved on the server. Use the save() method on the object
276+
to write it on the server.
277+
"""
278+
returnself._getListOrObject(Hook,id,**kwargs)
279+
267280
defProject(self,id=None,**kwargs):
268281
"""Creates/gets/lists project(s) known by the GitLab server.
269282
@@ -433,6 +446,10 @@ class Group(GitlabObject):
433446
_constructorTypes= {'projects':'Project'}
434447

435448

449+
classHook(GitlabObject):
450+
_url='/hooks'
451+
452+
436453
classIssue(GitlabObject):
437454
_url='/issues'
438455
_constructorTypes= {'author':'User','assignee':'User',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp