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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
00ced598
Commit
00ced598
authored
Apr 30, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added UI to define secret_token for webhook and systemhook
Codestyle changes to easy EE merge
parent
0cd5edf3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
6 deletions
+31
-6
app/controllers/admin/hooks_controller.rb
app/controllers/admin/hooks_controller.rb
+7
-1
app/controllers/projects/hooks_controller.rb
app/controllers/projects/hooks_controller.rb
+11
-3
app/views/admin/hooks/index.html.haml
app/views/admin/hooks/index.html.haml
+8
-2
app/views/projects/hooks/index.html.haml
app/views/projects/hooks/index.html.haml
+5
-0
No files found.
app/controllers/admin/hooks_controller.rb
View file @
00ced598
...
...
@@ -39,6 +39,12 @@ class Admin::HooksController < Admin::ApplicationController
end
def
hook_params
params
.
require
(
:hook
).
permit
(
:url
,
:enable_ssl_verification
,
:push_events
,
:tag_push_events
)
params
.
require
(
:hook
).
permit
(
:enable_ssl_verification
,
:push_events
,
:tag_push_events
,
:token
,
:url
)
end
end
app/controllers/projects/hooks_controller.rb
View file @
00ced598
...
...
@@ -52,8 +52,16 @@ class Projects::HooksController < Projects::ApplicationController
end
def
hook_params
params
.
require
(
:hook
).
permit
(
:url
,
:push_events
,
:issues_events
,
:merge_requests_events
,
:tag_push_events
,
:note_events
,
:build_events
,
:enable_ssl_verification
)
params
.
require
(
:hook
).
permit
(
:build_events
,
:enable_ssl_verification
,
:issues_events
,
:merge_requests_events
,
:note_events
,
:push_events
,
:tag_push_events
,
:token
,
:url
)
end
end
app/views/admin/hooks/index.html.haml
View file @
00ced598
...
...
@@ -13,9 +13,15 @@
=
form_errors
(
@hook
)
.form-group
=
f
.
label
:url
,
"URL:"
,
class:
'control-label'
=
f
.
label
:url
,
'URL'
,
class:
'control-label'
.col-sm-10
=
f
.
text_field
:url
,
class:
"form-control"
=
f
.
text_field
:url
,
class:
'form-control'
.form-group
=
f
.
label
:token
,
'Secret Token'
,
class:
'control-label'
.col-sm-10
=
f
.
text_field
:token
,
class:
'form-control'
%p
.help-block
Use this token to validate received payloads
.form-group
=
f
.
label
:url
,
"Trigger"
,
class:
'control-label'
.col-sm-10.prepend-top-10
...
...
app/views/projects/hooks/index.html.haml
View file @
00ced598
...
...
@@ -15,6 +15,11 @@
.form-group
=
f
.
label
:url
,
"URL"
,
class:
"label-light"
=
f
.
text_field
:url
,
class:
"form-control"
,
placeholder:
"http://example.com/trigger-ci.json"
.form-group
=
f
.
label
:token
,
"Secret Token"
,
class:
'label-light'
=
f
.
text_field
:token
,
class:
"form-control"
,
placeholder:
''
%p
.help-block
Use this token to validate received payloads
.form-group
=
f
.
label
:url
,
"Trigger"
,
class:
"label-light"
%div
...
...
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