Class: Integrations::Mattermost

Inherits:
BaseChatNotification show all
Includes:
SlackMattermostNotifier
Defined in:
app/models/integrations/mattermost.rb

Constant Summary

Constants inherited from BaseChatNotification

BaseChatNotification::EVENT_CHANNEL, BaseChatNotification::LABEL_NOTIFICATION_BEHAVIOURS, BaseChatNotification::SUPPORTED_EVENTS, BaseChatNotification::SUPPORTED_EVENTS_FOR_LABEL_FILTER

Constants inherited from Integration

Integration::BASE_CLASSES, Integration::DEV_INTEGRATION_NAMES, Integration::INTEGRATION_NAMES, Integration::PROJECT_SPECIFIC_INTEGRATION_NAMES, Integration::SECTION_TYPE_CONNECTION, Integration::UnknownType

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Attribute Summary

Attributes included from Importable

#imported, #importing

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseChatNotification

#confidential_issue_channel, #confidential_note_channel, #default_fields, #event_channel_names, #event_field, #execute, #fields, #global_fields, #initialize_properties, supported_events

Methods included from NotificationBranchSelection

#branch_choices, #notify_for_branch?

Methods inherited from Integration

#activate_disabled_reason, #activated?, #api_field_names, #async_execute, #attributes, available_integration_names, available_integration_types, boolean_accessor, build_from_integration, #category, #configurable_events, create_from_active_default_integrations, default_integration, default_test_event, #default_test_event, dev_integration_names, #dup, #editable?, #event_channel_names, event_description, #event_field, #event_names, event_names, #execute, field, fields, #fields, find_or_initialize_all_non_project_specific, find_or_initialize_non_project_specific_integration, #global_fields, #group_level?, #inheritable?, inherited_descendants_from_self_or_ancestors_from, #initialize_properties, instance_exists_for?, #instance_level?, integration_name_to_model, integration_name_to_type, integration_names, #json_fields, #operating?, #parent, #project_level?, project_specific_integration_names, prop_accessor, #properties=, #reencrypt_properties, #reset_updated_properties, #secret_fields, #sections, #show_active_box?, #supported_events, supported_events, #supports_data_fields?, #test, #testable?, #to_data_fields_hash, #to_integration_hash, #to_param, #updated_properties

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods included from ResetSecretFields

#exposing_secrets_fields

Methods included from Loggable

#build_message, #log_error, #log_exception, #log_info, #logger

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Class Method Details

.to_paramObject


15
16
17
# File 'app/models/integrations/mattermost.rb', line 15

def self.to_param
  'mattermost'
end

Instance Method Details

#default_channel_placeholderObject


24
25
26
# File 'app/models/integrations/mattermost.rb', line 24

def default_channel_placeholder
  'my-channel'
end

#descriptionObject


11
12
13
# File 'app/models/integrations/mattermost.rb', line 11

def description
  s_('Send notifications about project events to Mattermost channels.')
end

#helpObject


19
20
21
22
# File 'app/models/integrations/mattermost.rb', line 19

def help
  docs_link = ActionController::Base.helpers.link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('user/project/integrations/mattermost'), target: '_blank', rel: 'noopener noreferrer'
  s_('Send notifications about project events to Mattermost channels. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end

#titleObject


7
8
9
# File 'app/models/integrations/mattermost.rb', line 7

def title
  s_('Mattermost notifications')
end

#webhook_placeholderObject


28
29
30
# File 'app/models/integrations/mattermost.rb', line 28

def webhook_placeholder
  'http://mattermost.example.com/hooks/'
end