diff options
author | Jason Goodman <jgoodman@gitlab.com> | 2019-04-26 21:08:41 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-26 21:08:41 +0000 |
commit | fe86890b9d7a720648e7570d227c438d6ca7f25a (patch) | |
tree | 1c583b22cea6404de37ae6217f320d93cdf7cde9 /app/models/service.rb | |
parent | 265b789476479c29ea88db174aca1d80ddf24358 (diff) | |
download | gitlab-ce-fe86890b9d7a720648e7570d227c438d6ca7f25a.tar.gz |
Add deployment events to chat notification services
This enables sending a chat message to Slack or Mattermost
upon a successful, failed, or canceled deployment
Diffstat (limited to 'app/models/service.rb')
-rw-r--r-- | app/models/service.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/service.rb b/app/models/service.rb index de549becf71..9896aa12e90 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -50,6 +50,7 @@ class Service < ApplicationRecord scope :job_hooks, -> { where(job_events: true, active: true) } scope :pipeline_hooks, -> { where(pipeline_events: true, active: true) } scope :wiki_page_hooks, -> { where(wiki_page_events: true, active: true) } + scope :deployment_hooks, -> { where(deployment_events: true, active: true) } scope :external_issue_trackers, -> { issue_trackers.active.without_defaults } scope :deployment, -> { where(category: 'deployment') } @@ -335,6 +336,8 @@ class Service < ApplicationRecord "Event will be triggered when a wiki page is created/updated" when "commit", "commit_events" "Event will be triggered when a commit is created/updated" + when "deployment" + "Event will be triggered when a deployment finishes" end end |