feat(core): implement TriggerHookAction handler#1494
Merged
Conversation
Implements TriggerHookAction handler for ActionInterpreter (Issue #1410). The handler: - Takes hookName (required) and payload (optional) parameters - Dispatches webhook event via WebhookService - Supports payload as JSON string or direct object - Includes currentAsset's filePath in webhook payload - Handles errors gracefully with descriptive messages Changes: - Added webhookService as 5th constructor parameter to ActionInterpreter - Implemented triggerHookHandler with full functionality - Added 7 comprehensive unit tests for TriggerHookAction Tests cover: - Webhook triggering with hookName and payload - Missing hookName validation - WebhookService not initialized error - Object payload (not stringified) - Empty payload handling - Webhook dispatch failure handling - Including filePath from currentAsset Closes #1410
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.
Summary
Implements TriggerHookAction handler for ActionInterpreter (Phase 3, Handler 6/8).
Changes
webhookServiceas 5th constructor parameter toActionInterpretertriggerHookHandlerwith full functionality:hookName(required) andpayload(optional) parametersWebhookService.dispatchEvent()currentAsset.pathin webhook payloadTest Coverage
Technical Approach
Test Plan
Closes #1410