diff options
author | James Fargher <proglottis@gmail.com> | 2019-02-21 00:29:48 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-02-21 00:29:48 +0300 |
commit | 2d19b1adef1fd880c3d49f307ff8d5317d31d94a (patch) | |
tree | 5c16a7ffb65801b8dd7ace152d0a9e0edee358ac /app/models/ci | |
parent | ee0a007f8f47ba1c8117f2e9130663461181a145 (diff) |
Move ChatOps to Core
ChatOps used to be in the Ultimate tier.
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/pipeline.rb | 2 | ||||
-rw-r--r-- | app/models/ci/pipeline_chat_data.rb | 13 | ||||
-rw-r--r-- | app/models/ci/pipeline_enums.rb | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index f0ae516a2f8..eb15347b4e1 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -47,6 +47,8 @@ module Ci has_many :auto_canceled_pipelines, class_name: 'Ci::Pipeline', foreign_key: 'auto_canceled_by_id' has_many :auto_canceled_jobs, class_name: 'CommitStatus', foreign_key: 'auto_canceled_by_id' + has_one :chat_data, class_name: 'Ci::PipelineChatData' + accepts_nested_attributes_for :variables, reject_if: :persisted? delegate :id, to: :project, prefix: true diff --git a/app/models/ci/pipeline_chat_data.rb b/app/models/ci/pipeline_chat_data.rb new file mode 100644 index 00000000000..8d37500fec5 --- /dev/null +++ b/app/models/ci/pipeline_chat_data.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Ci + class PipelineChatData < ActiveRecord::Base + self.table_name = 'ci_pipeline_chat_data' + + belongs_to :chat_name + + validates :pipeline_id, presence: true + validates :chat_name_id, presence: true + validates :response_url, presence: true + end +end diff --git a/app/models/ci/pipeline_enums.rb b/app/models/ci/pipeline_enums.rb index 2994aaae4aa..4be4fdb1ff2 100644 --- a/app/models/ci/pipeline_enums.rb +++ b/app/models/ci/pipeline_enums.rb @@ -22,6 +22,7 @@ module Ci schedule: 4, api: 5, external: 6, + chat: 8, merge_request: 10 } end |