Feat/update action - #157
Merged
Merged
Conversation
armiiller
force-pushed
the
feat/update-action
branch
from
September 21, 2026 20:31
6c3d031 to
b5b53c1
Compare
Contributor
There was a problem hiding this comment.
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
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
:updatetoadapter_actionfor Webhook V3, Email V3 (custom definition), and Custom Webhook V3. - Introduce
adapter_process_updateimplementations that omitthirdparty_idand 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.