Class: Integrations::Campfire
- Inherits:
-
Integration
- Object
- ActiveRecord::Base
- ApplicationRecord
- Integration
- Integrations::Campfire
- Includes:
- HasAvatar
- Defined in:
- app/models/integrations/campfire.rb
Constant Summary collapse
- SUBDOMAIN_REGEXP =
%r{\A[a-z](?:[a-z0-9-]*[a-z0-9])?\z}i
Constants included from Base::Integration
Base::Integration::BASE_ATTRIBUTES, Base::Integration::BASE_CLASSES, Base::Integration::DEV_INTEGRATION_NAMES, Base::Integration::INSTANCE_LEVEL_ONLY_INTEGRATION_NAMES, Base::Integration::INTEGRATION_NAMES, Base::Integration::PROJECT_AND_GROUP_LEVEL_ONLY_INTEGRATION_NAMES, Base::Integration::PROJECT_LEVEL_ONLY_INTEGRATION_NAMES, Base::Integration::SECTION_TYPE_CONFIGURATION, Base::Integration::SECTION_TYPE_CONNECTION, Base::Integration::SECTION_TYPE_TRIGGER, Base::Integration::SNOWPLOW_EVENT_ACTION, Base::Integration::SNOWPLOW_EVENT_LABEL, Base::Integration::UnknownType
Constants inherited from ApplicationRecord
Constants included from HasCheckConstraints
HasCheckConstraints::NOT_NULL_CHECK_PATTERN
Constants included from ResetOnColumnErrors
ResetOnColumnErrors::MAX_RESET_PERIOD
Class Method Summary collapse
Instance Method Summary collapse
Methods included from HasAvatar
Methods included from Base::Integration
#activate!, #activate_disabled_reason, #activated?, #api_field_names, #async_execute, #attributes, #attribution_notice, #category, #chat?, #ci?, #configurable_events, #deactivate!, #default_test_event, #description, #dup, #editable?, #event_channel_names, #event_names, #fields, #form_fields, #group_level?, #help, #inheritable?, #initialize_properties, #instance_level?, #json_fields, #manual_activation?, #operating?, #parent, #project_level?, #reencrypt_properties, #reset_updated_properties, #secret_fields, #sections, #supported_events, #supports_data_fields?, #test, #testable?, #title, #to_database_hash, #to_param, #toggle!, #updated_properties
Methods included from Gitlab::Utils::Override
#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!
Methods inherited from ApplicationRecord
===, cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, nullable_column?, 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 ResetOnColumnErrors
#reset_on_union_error, #reset_on_unknown_attribute_error
Methods included from Gitlab::SensitiveSerializableHash
Class Method Details
.description ⇒ Object
52 53 54 |
# File 'app/models/integrations/campfire.rb', line 52 def self.description 'Send notifications about push events to Campfire chat rooms.' end |
.help ⇒ Object
56 57 58 59 60 61 62 |
# File 'app/models/integrations/campfire.rb', line 56 def self.help build_help_page_url( 'api/integrations.md', s_('CampfireService|Send notifications about push events to Campfire chat rooms.'), { anchor: 'campfire' } ) end |
.supported_events ⇒ Object
68 69 70 |
# File 'app/models/integrations/campfire.rb', line 68 def self.supported_events %w[push] end |
.title ⇒ Object
48 49 50 |
# File 'app/models/integrations/campfire.rb', line 48 def self.title 'Campfire' end |
.to_param ⇒ Object
64 65 66 |
# File 'app/models/integrations/campfire.rb', line 64 def self.to_param 'campfire' end |
Instance Method Details
#execute(data) ⇒ Object
72 73 74 75 76 77 |
# File 'app/models/integrations/campfire.rb', line 72 def execute(data) return unless supported_events.include?(data[:object_kind]) = (data) speak(room, , auth) end |