Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
37f229c7
Commit
37f229c7
authored
Nov 02, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs and test description
[ci skip]
parent
57fd233a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
doc/api/system_hooks.md
doc/api/system_hooks.md
+4
-4
spec/requests/api/system_hooks_spec.rb
spec/requests/api/system_hooks_spec.rb
+2
-1
No files found.
doc/api/system_hooks.md
View file @
37f229c7
...
...
@@ -51,10 +51,10 @@ POST /hooks
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
|
`url`
| string | yes | The hook URL |
|
token | string | no | The token to validate payloads
|
|
push_events
| boolean | no | When true, the hook will fire on push events |
|
tag_push_events
| boolean | no | When true, the hook will fire on new tags being pushed |
|
enable_ssl_verification
| boolean | no | Do SSL verification when triggering the hook |
|
`token`
| string | no | Secret token to validate received payloads; this will not be returned in the response
|
|
`push_events`
| boolean | no | When true, the hook will fire on push events |
|
`tag_push_events`
| boolean | no | When true, the hook will fire on new tags being pushed |
|
`enable_ssl_verification`
| boolean | no | Do SSL verification when triggering the hook |
Example request:
...
...
spec/requests/api/system_hooks_spec.rb
View file @
37f229c7
...
...
@@ -48,6 +48,7 @@ describe API::API, api: true do
it
"responds with 400 if url not given"
do
post
api
(
"/hooks"
,
admin
)
expect
(
response
).
to
have_http_status
(
400
)
end
...
...
@@ -57,7 +58,7 @@ describe API::API, api: true do
end
.
not_to
change
{
SystemHook
.
count
}
end
it
'
allows the events to be selected
'
do
it
'
sets default values for events
'
do
post
api
(
'/hooks'
,
admin
),
url:
'http://mep.mep'
,
enable_ssl_verification:
true
expect
(
response
).
to
have_http_status
(
201
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment