Skip to content

Commit 57f6e4f

Browse files
authored
fix: refining incoming actions (#69)
1 parent 44084e6 commit 57f6e4f

File tree

7 files changed

+3
-11
lines changed

7 files changed

+3
-11
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
pager_tree-integrations (1.1.0)
4+
pager_tree-integrations (1.1.1)
55
rails (>= 7.0.1)
66

77
GEM

app/models/pager_tree/integrations/integration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def adapter_incoming_can_defer?
4848
true
4949
end
5050

51-
# Returns :create, :acknowledge, :resolve, or :other
51+
# Returns :create, :resolve, or :other
5252
def adapter_action
5353
:other
5454
end

app/models/pager_tree/integrations/logic_monitor/v3.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ def adapter_action
2727
case alert_status
2828
when "active", "test"
2929
:create
30-
# when "ack"
31-
# :acknowledge
3230
when "clear"
3331
:resolve
3432
else

app/models/pager_tree/integrations/new_relic/v3.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ def adapter_action
2828

2929
if event_type == "INCIDENT_OPEN" || (event_type == "INCIDENT" && current_state == "open")
3030
:create
31-
# elsif event_type == "INCIDENT_ACKNOWLEDGED" || (event_type == "INCIDENT" && current_state == "acknowledged")
32-
# :acknowledge
3331
elsif event_type == "INCIDENT_RESOLVED" || (event_type == "INCIDENT" && current_state == "closed")
3432
:resolve
3533
else

app/models/pager_tree/integrations/webhook/v3.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ def adapter_action
3535
case adapter_incoming_request_params.dig("event_type").to_s.downcase.strip
3636
when "create"
3737
:create
38-
# when "acknowledge"
39-
# :acknowledge
4038
when "resolve"
4139
:resolve
4240
else

app/models/pager_tree/integrations/zendesk/v3.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ def adapter_action
2626
case adapter_incoming_request_params.dig("event_type")
2727
when "create"
2828
:create
29-
when "acknowledge"
30-
:acknowledge
3129
when "resolve"
3230
:resolve
3331
else

lib/generators/integration/templates/model.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module PagerTree::Integrations
3535
adapter_incoming_request_params.dig("id")
3636
end
3737

38-
# TODO: Returns :create, :acknowledge, :resolve, or :other
38+
# TODO: Returns :create, :resolve, or :other
3939
def adapter_action
4040
:other
4141
end

0 commit comments

Comments
 (0)