Skip to content

Feat/update action - #157

Merged
armiiller merged 2 commits into
mainfrom
feat/update-action
Sep 22, 2026
Merged

armiiller merged 2 commits into
mainfrom
feat/update-action

Conversation

@armiiller

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Webhook V3’s new incident update parsing uses !! which miscasts string booleans (e.g., "false" becomes true), and there are misleading interface/documentation statements that should be corrected.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity · 2 Low severity

Open (3)
What changed in this PR

This PR adds support for an incoming :update action across the Webhook V3 adapter and the custom-template flows for Email V3 and Custom Webhook V3, along with VCR fixtures and tests to validate the new behavior.

Changes:

  • Add :update to adapter_action for Webhook V3, Email V3 (custom definition), and Custom Webhook V3.
  • Introduce adapter_process_update implementations that omit thirdparty_id and aim to avoid overwriting fields that weren’t provided.
  • Add/update tests and VCR cassettes to cover update action routing and update payload processing.
File Description
app/​models/​pager_tree/​integrations/​integration.rb Adds adapter_process_update hook to the base integration interface.
app/​models/​pager_tree/​integrations/​webhook/​v3.rb Adds :update action and implements adapter_process_update + incident-meta handling.
app/​models/​pager_tree/​integrations/​email/​v3.rb Adds :update action for custom-definition results and implements adapter_process_update.
app/​models/​pager_tree/​integrations/​custom_webhook/​v3.rb Adds :update action and implements adapter_process_update for custom webhook service results.
test/​models/​pager_tree/​integrations/​webhook/​v3_test.rb Adds coverage for update action + update processing semantics.
test/​models/​pager_tree/​integrations/​email/​v3_test.rb Adds coverage for update action + update processing via custom definition.
test/​models/​pager_tree/​integrations/​custom_webhook/​v3_test.rb Adds coverage for update action + update processing via custom webhook service.
test/​vcr_cassettes/​email_v3_custom_adapter_process_update.yml Records update-processing response for Email V3 custom definition.
test/​vcr_cassettes/​email_v3_custom_adapter_action_update.yml Records update-action detection response for Email V3 custom definition.
test/​vcr_cassettes/​custom_webhook_v3_adapter_process_update.yml Records update-processing response for Custom Webhook V3.
test/​vcr_cassettes/​custom_webhook_v3_adapter_action_update.yml Records update-action detection response for Custom Webhook V3.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/models/pager_tree/integrations/webhook/v3.rb
Comment thread app/models/pager_tree/integrations/integration.rb
Comment thread app/models/pager_tree/integrations/webhook/v3.rb Outdated
Refactor incident update method to use ActiveModel for boolean casting. Update comments for clarity in adapter_process_update method.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@armiiller
armiiller merged commit 7a4b2c9 into main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants