Class: Integrations::Assembla
- Inherits:
-
Integration
- Object
- ActiveRecord::Base
- ApplicationRecord
- Integration
- Integrations::Assembla
- Defined in:
- app/models/integrations/assembla.rb
Constant Summary
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 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
24 25 26 |
# File 'app/models/integrations/assembla.rb', line 24 def self.description _('Manage projects.') end |
.supported_events ⇒ Object
32 33 34 |
# File 'app/models/integrations/assembla.rb', line 32 def self.supported_events %w[push] end |
.title ⇒ Object
20 21 22 |
# File 'app/models/integrations/assembla.rb', line 20 def self.title 'Assembla' end |
.to_param ⇒ Object
28 29 30 |
# File 'app/models/integrations/assembla.rb', line 28 def self.to_param 'assembla' end |
Instance Method Details
#execute(data) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'app/models/integrations/assembla.rb', line 36 def execute(data) return unless supported_events.include?(data[:object_kind]) url = "https://atlas.assembla.com/spaces/#{subdomain}/github_tool?secret_key=#{token}" body = { payload: data } Gitlab::HTTP.post(url, body: Gitlab::Json.dump(body), headers: { 'Content-Type' => 'application/json' }) end |