summaryrefslogtreecommitdiff
path: root/app/models/hooks
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-02 18:06:31 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-08-02 18:22:24 +0800
commit020ea32e767b9ad033f9fedcaa902865a01fa944 (patch)
tree805d1137fcade1d3f806b83a6504a0727a2bc351 /app/models/hooks
parent632113e43cc3296759b11dc20b1b7f2f056278f0 (diff)
downloadgitlab-ce-020ea32e767b9ad033f9fedcaa902865a01fa944.tar.gz
Implement pipeline hooks, extracted from !5525
Closes #20115
Diffstat (limited to 'app/models/hooks')
-rw-r--r--app/models/hooks/project_hook.rb1
-rw-r--r--app/models/hooks/web_hook.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/models/hooks/project_hook.rb b/app/models/hooks/project_hook.rb
index ba42a8eeb70..836a75b0608 100644
--- a/app/models/hooks/project_hook.rb
+++ b/app/models/hooks/project_hook.rb
@@ -5,5 +5,6 @@ class ProjectHook < WebHook
scope :note_hooks, -> { where(note_events: true) }
scope :merge_request_hooks, -> { where(merge_requests_events: true) }
scope :build_hooks, -> { where(build_events: true) }
+ scope :pipeline_hooks, -> { where(pipeline_events: true) }
scope :wiki_page_hooks, -> { where(wiki_page_events: true) }
end
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb
index 8b87b6c3d64..f365dee3141 100644
--- a/app/models/hooks/web_hook.rb
+++ b/app/models/hooks/web_hook.rb
@@ -8,6 +8,7 @@ class WebHook < ActiveRecord::Base
default_value_for :merge_requests_events, false
default_value_for :tag_push_events, false
default_value_for :build_events, false
+ default_value_for :pipeline_events, false
default_value_for :enable_ssl_verification, true
scope :push_hooks, -> { where(push_events: true) }