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
cfb4404e
Commit
cfb4404e
authored
May 05, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update SystemHooks API to expose and handle new repository_update_events
parent
2e97db05
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
lib/api/entities.rb
lib/api/entities.rb
+1
-1
spec/requests/api/system_hooks_spec.rb
spec/requests/api/system_hooks_spec.rb
+2
-1
spec/requests/api/v3/system_hooks_spec.rb
spec/requests/api/v3/system_hooks_spec.rb
+2
-1
No files found.
lib/api/entities.rb
View file @
cfb4404e
...
...
@@ -53,7 +53,7 @@ module API
end
class
Hook
<
Grape
::
Entity
expose
:id
,
:url
,
:created_at
,
:push_events
,
:tag_push_events
expose
:id
,
:url
,
:created_at
,
:push_events
,
:tag_push_events
,
:repository_update_events
expose
:enable_ssl_verification
end
...
...
spec/requests/api/system_hooks_spec.rb
View file @
cfb4404e
...
...
@@ -32,8 +32,9 @@ describe API::SystemHooks do
expect
(
response
).
to
include_pagination_headers
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
first
[
'url'
]).
to
eq
(
hook
.
url
)
expect
(
json_response
.
first
[
'push_events'
]).
to
be
tru
e
expect
(
json_response
.
first
[
'push_events'
]).
to
be
fals
e
expect
(
json_response
.
first
[
'tag_push_events'
]).
to
be
false
expect
(
json_response
.
first
[
'repository_update_events'
]).
to
be
true
end
end
end
...
...
spec/requests/api/v3/system_hooks_spec.rb
View file @
cfb4404e
...
...
@@ -31,8 +31,9 @@ describe API::V3::SystemHooks do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
first
[
'url'
]).
to
eq
(
hook
.
url
)
expect
(
json_response
.
first
[
'push_events'
]).
to
be
tru
e
expect
(
json_response
.
first
[
'push_events'
]).
to
be
fals
e
expect
(
json_response
.
first
[
'tag_push_events'
]).
to
be
false
expect
(
json_response
.
first
[
'repository_update_events'
]).
to
be
true
end
end
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