System hooks

Use Hook objects to manipulate system hooks. The gitlab.Gitlab.hooks manager object provides helper functions.

Examples

List the system hooks:

hooks = gl.hooks.list()

Create a system hook:

hook = gl.hooks.create({'url': 'http://your.target.url'})

Test a system hook. The returned object is not usable (it misses the hook ID):

gl.hooks.get(hook_id)

Delete a system hook:

gl.hooks.delete(hook_id)
# or
hook.delete()