Class: JiraServer::V3
- Inherits:
-
Integration
- Object
- Integration
- JiraServer::V3
- Defined in:
- app/models/pager_tree/integrations/jira_server/v3.rb
Constant Summary collapse
- OPTIONS =
[ {key: :issue_updated, type: :boolean, default: false} ]
Instance Method Summary collapse
- #adapter_action ⇒ Object
- #adapter_incoming_can_defer? ⇒ Boolean
- #adapter_process_create ⇒ Object
- #adapter_supports_incoming? ⇒ Boolean
- #adapter_supports_outgoing? ⇒ Boolean
- #adapter_thirdparty_id ⇒ Object
Instance Method Details
#adapter_action ⇒ Object
30 31 32 33 |
# File 'app/models/pager_tree/integrations/jira_server/v3.rb', line 30 def adapter_action event = adapter_incoming_request_params.dig("webhookEvent") event == "jira:issue_created" || (self.option_issue_updated == true && event == "jira:issue_updated") ? :create : :other end |
#adapter_incoming_can_defer? ⇒ Boolean
22 23 24 |
# File 'app/models/pager_tree/integrations/jira_server/v3.rb', line 22 def adapter_incoming_can_defer? true end |
#adapter_process_create ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'app/models/pager_tree/integrations/jira_server/v3.rb', line 35 def adapter_process_create Alert.new( title: _title, description: _description, thirdparty_id: adapter_thirdparty_id, dedup_keys: [], additional_data: _additional_datums ) end |
#adapter_supports_incoming? ⇒ Boolean
14 15 16 |
# File 'app/models/pager_tree/integrations/jira_server/v3.rb', line 14 def adapter_supports_incoming? true end |
#adapter_supports_outgoing? ⇒ Boolean
18 19 20 |
# File 'app/models/pager_tree/integrations/jira_server/v3.rb', line 18 def adapter_supports_outgoing? false end |
#adapter_thirdparty_id ⇒ Object
26 27 28 |
# File 'app/models/pager_tree/integrations/jira_server/v3.rb', line 26 def adapter_thirdparty_id adapter_incoming_request_params.dig("issue", "id") end |