File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed
src/github/validation/__tests__ Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -3,21 +3,33 @@ import { checkContainsTrigger } from "../trigger";
33import type { EntityContext } from "../../context" ;
44
55describe ( "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" , ( ) => {
You can’t perform that action at this time.
0 commit comments