Class: Integrations::MicrosoftTeams
Constant Summary
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
ApplicationRecord::MAX_PLUCK
Instance Attribute Summary
Attributes included from Importable
#imported, #importing
Class Method Summary
collapse
Instance Method Summary
collapse
#confidential_issue_channel, #confidential_note_channel, #event_channel_names, #execute, #fields, #global_fields, #initialize_properties
#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_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, #supports_data_fields?, #test, #testable?, #to_data_fields_hash, #to_integration_hash, #to_param, #updated_properties
#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!
#exposing_secrets_fields
Methods included from Loggable
#build_message, #log_error, #log_exception, #log_info, #logger
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
#serializable_hash
Class Method Details
.supported_events ⇒ Object
31
32
33
34
|
# File 'app/models/integrations/microsoft_teams.rb', line 31
def self.supported_events
%w[push issue confidential_issue merge_request note confidential_note tag_push
pipeline wiki_page]
end
|
.to_param ⇒ Object
13
14
15
|
# File 'app/models/integrations/microsoft_teams.rb', line 13
def self.to_param
'microsoft_teams'
end
|
Instance Method Details
#default_channel_placeholder ⇒ Object
28
29
|
# File 'app/models/integrations/microsoft_teams.rb', line 28
def default_channel_placeholder
end
|
#default_fields ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'app/models/integrations/microsoft_teams.rb', line 36
def default_fields
[
{ type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}" },
{ type: 'checkbox', name: 'notify_only_broken_pipelines', help: 'If selected, successful pipelines do not trigger a notification event.' },
{
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}
]
end
|
#description ⇒ Object
9
10
11
|
# File 'app/models/integrations/microsoft_teams.rb', line 9
def description
'Send notifications about project events to Microsoft Teams.'
end
|
#event_field(event) ⇒ Object
25
26
|
# File 'app/models/integrations/microsoft_teams.rb', line 25
def event_field(event)
end
|
#help ⇒ Object
17
18
19
|
# File 'app/models/integrations/microsoft_teams.rb', line 17
def help
'<p>Use this service to send notifications about events in GitLab projects to your Microsoft Teams channels. <a href="https://docs.gitlab.com/ee/user/project/integrations/microsoft_teams.html" target="_blank" rel="noopener noreferrer">How do I configure this integration?</a></p>'
end
|
#title ⇒ Object
5
6
7
|
# File 'app/models/integrations/microsoft_teams.rb', line 5
def title
'Microsoft Teams notifications'
end
|
#webhook_placeholder ⇒ Object
21
22
23
|
# File 'app/models/integrations/microsoft_teams.rb', line 21
def webhook_placeholder
'https://outlook.office.com/webhook/…'
end
|