File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,25 @@ describe("PayloadHelper", () => {
6464 expect ( helper . getTemplateVariables ( ) ) . toStrictEqual ( expectedData ) ;
6565 } ) ;
6666 it ( "should be able to return pull request variables" , ( ) => {
67+ // @ts -ignore
6768 const context : Context < Webhooks . WebhookPayloadPullRequest > = {
6869 payload : {
6970 // @ts -ignore
7071 pull_request : {
7172 body : "pr_body" ,
73+ head : {
74+ ref : "test-branch" ,
75+ label : "" ,
76+ sha : "" ,
77+ // @ts -ignore
78+ repo : {
79+ id : 1 ,
80+ node_id : "1" ,
81+ name : "" ,
82+ full_name : "" ,
83+ private : false
84+ }
85+ } ,
7286 number : 5 ,
7387 labels : [ ] ,
7488 patch_url : "https://github.com/fossapps/Handlebars-Issue-and-Pull-Requests/pull/1.patch" ,
@@ -97,7 +111,8 @@ describe("PayloadHelper", () => {
97111 patch_url : "https://github.com/fossapps/Handlebars-Issue-and-Pull-Requests/pull/1.patch" ,
98112 issue_url : "https://github.com/fossapps/Handlebars-Issue-and-Pull-Requests/pull/1" ,
99113 html_url : "https://github.com/fossapps/Handlebars-Issue-and-Pull-Requests/pull/1" ,
100- diff_url : "https://github.com/fossapps/Handlebars-Issue-and-Pull-Requests/pull/1.diff"
114+ diff_url : "https://github.com/fossapps/Handlebars-Issue-and-Pull-Requests/pull/1.diff" ,
115+ branch : "test-branch"
101116 } ,
102117 id : 5
103118 } ;
You can’t perform that action at this time.
0 commit comments