From 1a6e0b635508501c95d2c72ac2b959d6d76fffec Mon Sep 17 00:00:00 2001 From: kashyap murali Date: Tue, 9 Sep 2025 22:11:05 -0700 Subject: [PATCH] Update src/github/validation/__tests__/trigger.test.ts Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- .../validation/__tests__/trigger.test.ts | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/github/validation/__tests__/trigger.test.ts b/src/github/validation/__tests__/trigger.test.ts index e410231..22b088a 100644 --- a/src/github/validation/__tests__/trigger.test.ts +++ b/src/github/validation/__tests__/trigger.test.ts @@ -3,21 +3,33 @@ import { checkContainsTrigger } from "../trigger"; import type { EntityContext } from "../../context"; describe("Trigger Validation", () => { - const createMockContext = (overrides = {}): EntityContext => ({ - eventName: "issue_comment.created", + const createMockContext = (overrides = {}): ParsedGitHubContext => ({ + eventName: "issue_comment", + eventAction: "created", repository: { owner: "test-owner", repo: "test-repo", + full_name: "test-owner/test-repo", }, actor: "testuser", - isPR: false, entityNumber: 42, - comment: { - body: "Test comment", - id: 12345, + isPR: false, + runId: "test-run-id", + inputs: { + triggerPhrase: "@claude", + assigneeTrigger: "", + labelTrigger: "", + prompt: "", + trackProgress: false, + }, + payload: { + comment: { + body: "Test comment", + id: 12345, + }, }, ...overrides, - } as EntityContext); + } as ParsedGitHubContext); describe("checkContainsTrigger", () => { test("should detect @claude mentions", () => {