BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2448fa69
Commit
2448fa69
authored
Jan 03, 2017
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project hooks params
parent
8daff07c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
project_hooks.rb
lib/api/project_hooks.rb
+1
-1
project_hooks_spec.rb
spec/requests/api/project_hooks_spec.rb
+3
-2
No files found.
lib/api/project_hooks.rb
View file @
2448fa69
...
...
@@ -15,7 +15,7 @@ module API
optional
:note_events
,
type:
Boolean
,
desc:
"Trigger hook on note(comment) events"
optional
:build_events
,
type:
Boolean
,
desc:
"Trigger hook on build events"
optional
:pipeline_events
,
type:
Boolean
,
desc:
"Trigger hook on pipeline events"
optional
:wiki_events
,
type:
Boolean
,
desc:
"Trigger hook on wiki events"
optional
:wiki_
page_
events
,
type:
Boolean
,
desc:
"Trigger hook on wiki events"
optional
:enable_ssl_verification
,
type:
Boolean
,
desc:
"Do SSL verification when triggering the hook"
optional
:token
,
type:
String
,
desc:
"Secret token to validate received payloads; this will not be returned in the response"
end
...
...
spec/requests/api/project_hooks_spec.rb
View file @
2448fa69
...
...
@@ -86,7 +86,8 @@ describe API::ProjectHooks, 'ProjectHooks', api: true do
describe
"POST /projects/:id/hooks"
do
it
"adds hook to project"
do
expect
do
post
api
(
"/projects/
#{
project
.
id
}
/hooks"
,
user
),
url:
"http://example.com"
,
issues_events:
true
post
api
(
"/projects/
#{
project
.
id
}
/hooks"
,
user
),
url:
"http://example.com"
,
issues_events:
true
,
wiki_page_events:
true
end
.
to
change
{
project
.
hooks
.
count
}.
by
(
1
)
expect
(
response
).
to
have_http_status
(
201
)
...
...
@@ -98,7 +99,7 @@ describe API::ProjectHooks, 'ProjectHooks', api: true do
expect
(
json_response
[
'note_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'build_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'pipeline_events'
]).
to
eq
(
false
)
expect
(
json_response
[
'wiki_page_events'
]).
to
eq
(
fals
e
)
expect
(
json_response
[
'wiki_page_events'
]).
to
eq
(
tru
e
)
expect
(
json_response
[
'enable_ssl_verification'
]).
to
eq
(
true
)
expect
(
json_response
).
not_to
include
(
'token'
)
end
...
...
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