blob: a9e9feefc3fc59c5f7c7b553c8dc576649c6d08b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
############
System hooks
############
Reference
---------
* v4 API:
+ :class:`gitlab.v4.objects.Hook`
+ :class:`gitlab.v4.objects.HookManager`
+ :attr:`gitlab.Gitlab.hooks`
* v3 API:
+ :class:`gitlab.v3.objects.Hook`
+ :class:`gitlab.v3.objects.HookManager`
+ :attr:`gitlab.Gitlab.hooks`
* GitLab API: https://docs.gitlab.com/ce/api/system_hooks.html
Examples
--------
List the system hooks:
.. literalinclude:: system_hooks.py
:start-after: # list
:end-before: # end list
Create a system hook:
.. literalinclude:: system_hooks.py
:start-after: # create
:end-before: # end create
Test a system hook. The returned object is not usable (it misses the hook ID):
.. literalinclude:: system_hooks.py
:start-after: # test
:end-before: # end test
Delete a system hook:
.. literalinclude:: system_hooks.py
:start-after: # delete
:end-before: # end delete
|