diff options
Diffstat (limited to 'app/models/integration.rb')
-rw-r--r-- | app/models/integration.rb | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/app/models/integration.rb b/app/models/integration.rb index 23688a87cbd..41278dce22d 100644 --- a/app/models/integration.rb +++ b/app/models/integration.rb @@ -71,20 +71,20 @@ class Integration < ApplicationRecord alias_attribute :type, :type_new - default_value_for :active, false - default_value_for :alert_events, true - default_value_for :category, 'common' - default_value_for :commit_events, true - default_value_for :confidential_issues_events, true - default_value_for :confidential_note_events, true - default_value_for :issues_events, true - default_value_for :job_events, true - default_value_for :merge_requests_events, true - default_value_for :note_events, true - default_value_for :pipeline_events, true - default_value_for :push_events, true - default_value_for :tag_push_events, true - default_value_for :wiki_page_events, true + attribute :active, default: false + attribute :alert_events, default: true + attribute :category, default: 'common' + attribute :commit_events, default: true + attribute :confidential_issues_events, default: true + attribute :confidential_note_events, default: true + attribute :issues_events, default: true + attribute :job_events, default: true + attribute :merge_requests_events, default: true + attribute :note_events, default: true + attribute :pipeline_events, default: true + attribute :push_events, default: true + attribute :tag_push_events, default: true + attribute :wiki_page_events, default: true after_initialize :initialize_properties @@ -589,6 +589,10 @@ class Integration < ApplicationRecord false end + def chat? + category == :chat + end + private # Ancestors sorted by hierarchy depth in bottom-top order. |