Skip to content

Commit 1a6e0b6

Browse files
Update src/github/validation/__tests__/trigger.test.ts
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
1 parent 7dff9f0 commit 1a6e0b6

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/github/validation/__tests__/trigger.test.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,33 @@ import { checkContainsTrigger } from "../trigger";
33
import type { EntityContext } from "../../context";
44

55
describe("Trigger Validation", () => {
6-
const createMockContext = (overrides = {}): EntityContext => ({
7-
eventName: "issue_comment.created",
6+
const createMockContext = (overrides = {}): ParsedGitHubContext => ({
7+
eventName: "issue_comment",
8+
eventAction: "created",
89
repository: {
910
owner: "test-owner",
1011
repo: "test-repo",
12+
full_name: "test-owner/test-repo",
1113
},
1214
actor: "testuser",
13-
isPR: false,
1415
entityNumber: 42,
15-
comment: {
16-
body: "Test comment",
17-
id: 12345,
16+
isPR: false,
17+
runId: "test-run-id",
18+
inputs: {
19+
triggerPhrase: "@claude",
20+
assigneeTrigger: "",
21+
labelTrigger: "",
22+
prompt: "",
23+
trackProgress: false,
24+
},
25+
payload: {
26+
comment: {
27+
body: "Test comment",
28+
id: 12345,
29+
},
1830
},
1931
...overrides,
20-
} as EntityContext);
32+
} as ParsedGitHubContext);
2133

2234
describe("checkContainsTrigger", () => {
2335
test("should detect @claude mentions", () => {

0 commit comments

Comments
 (0)