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
iv
gitlab-ce
Commits
f6fa1866
Commit
f6fa1866
authored
Apr 18, 2016
by
Gabriel Mazetto
Committed by
Dmitriy Zaporozhets
Apr 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving overlapping scopes to webhook
parent
5330af3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
app/models/hooks/project_hook.rb
app/models/hooks/project_hook.rb
+0
-2
app/models/hooks/system_hook.rb
app/models/hooks/system_hook.rb
+0
-3
app/models/hooks/web_hook.rb
app/models/hooks/web_hook.rb
+3
-0
No files found.
app/models/hooks/project_hook.rb
View file @
f6fa1866
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
class
ProjectHook
<
WebHook
class
ProjectHook
<
WebHook
belongs_to
:project
belongs_to
:project
scope
:push_hooks
,
->
{
where
(
push_events:
true
)
}
scope
:tag_push_hooks
,
->
{
where
(
tag_push_events:
true
)
}
scope
:issue_hooks
,
->
{
where
(
issues_events:
true
)
}
scope
:issue_hooks
,
->
{
where
(
issues_events:
true
)
}
scope
:note_hooks
,
->
{
where
(
note_events:
true
)
}
scope
:note_hooks
,
->
{
where
(
note_events:
true
)
}
scope
:merge_request_hooks
,
->
{
where
(
merge_requests_events:
true
)
}
scope
:merge_request_hooks
,
->
{
where
(
merge_requests_events:
true
)
}
...
...
app/models/hooks/system_hook.rb
View file @
f6fa1866
...
@@ -19,9 +19,6 @@
...
@@ -19,9 +19,6 @@
#
#
class
SystemHook
<
WebHook
class
SystemHook
<
WebHook
scope
:push_hooks
,
->
{
where
(
push_events:
true
)
}
scope
:tag_push_hooks
,
->
{
where
(
tag_push_events:
true
)
}
def
async_execute
(
data
,
hook_name
)
def
async_execute
(
data
,
hook_name
)
Sidekiq
::
Client
.
enqueue
(
SystemHookWorker
,
id
,
data
,
hook_name
)
Sidekiq
::
Client
.
enqueue
(
SystemHookWorker
,
id
,
data
,
hook_name
)
end
end
...
...
app/models/hooks/web_hook.rb
View file @
f6fa1866
...
@@ -30,6 +30,9 @@ class WebHook < ActiveRecord::Base
...
@@ -30,6 +30,9 @@ class WebHook < ActiveRecord::Base
default_value_for
:build_events
,
false
default_value_for
:build_events
,
false
default_value_for
:enable_ssl_verification
,
true
default_value_for
:enable_ssl_verification
,
true
scope
:push_hooks
,
->
{
where
(
push_events:
true
)
}
scope
:tag_push_hooks
,
->
{
where
(
tag_push_events:
true
)
}
# HTTParty timeout
# HTTParty timeout
default_timeout
Gitlab
.
config
.
gitlab
.
webhook_timeout
default_timeout
Gitlab
.
config
.
gitlab
.
webhook_timeout
...
...
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