@@ -454,6 +454,16 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
454
454
Methods : ParseHttpMethods ([]string {"GET" }),
455
455
SetRequestHeaders : headers ,
456
456
},
457
+ AllowlistItem {
458
+ URL : gitHubBaseUrl .JoinPath ("/user" ).String (),
459
+ Methods : ParseHttpMethods ([]string {"GET" }),
460
+ SetRequestHeaders : headers ,
461
+ },
462
+ AllowlistItem {
463
+ URL : gitHubBaseUrl .JoinPath ("/user/repos" ).String (),
464
+ Methods : ParseHttpMethods ([]string {"GET" }),
465
+ SetRequestHeaders : headers ,
466
+ },
457
467
// PR info
458
468
AllowlistItem {
459
469
URL : gitHubBaseUrl .JoinPath ("/repos/:owner/:repo/pulls" ).String (),
@@ -466,6 +476,12 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
466
476
Methods : ParseHttpMethods ([]string {"POST" }),
467
477
SetRequestHeaders : headers ,
468
478
},
479
+ // get PR comment reactions
480
+ AllowlistItem {
481
+ URL : gitHubBaseUrl .JoinPath ("/repos/:owner/:repo/pulls/comments/:comment_id/reactions" ).String (),
482
+ Methods : ParseHttpMethods ([]string {"GET" }),
483
+ SetRequestHeaders : headers ,
484
+ },
469
485
// post issue comment
470
486
AllowlistItem {
471
487
URL : gitHubBaseUrl .JoinPath ("/repos/:owner/:repo/issues/:number/comments" ).String (),
@@ -554,6 +570,21 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
554
570
Methods : ParseHttpMethods ([]string {"PATCH" }),
555
571
SetRequestHeaders : headers ,
556
572
},
573
+ AllowlistItem {
574
+ URL : gitHubBaseUrl .JoinPath ("/repos/:org/:repo/compare/:basehead" ).String (),
575
+ Methods : ParseHttpMethods ([]string {"GET" }),
576
+ SetRequestHeaders : headers ,
577
+ },
578
+ AllowlistItem {
579
+ URL : gitHubBaseUrl .JoinPath ("/repos/:org/:repo/pulls/:number/comments/:comment_id" ).String (),
580
+ Methods : ParseHttpMethods ([]string {"PATCH" }),
581
+ SetRequestHeaders : headers ,
582
+ },
583
+ AllowlistItem {
584
+ URL : gitHubBaseUrl .JoinPath ("/repos/:org/:repo/pulls/comments/:comment_id/replies" ).String (),
585
+ Methods : ParseHttpMethods ([]string {"POST" }),
586
+ SetRequestHeaders : headers ,
587
+ },
557
588
AllowlistItem {
558
589
URL : gitHubBaseUrl .JoinPath ("/orgs/:org/teams" ).String (),
559
590
Methods : ParseHttpMethods ([]string {"GET" }),
@@ -576,7 +607,7 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
576
607
},
577
608
AllowlistItem {
578
609
URL : gitHubBaseUrl .JoinPath ("/orgs/:org/hooks" ).String (),
579
- Methods : ParseHttpMethods ([]string {"GET" }),
610
+ Methods : ParseHttpMethods ([]string {"GET" , "POST" }),
580
611
SetRequestHeaders : headers ,
581
612
},
582
613
AllowlistItem {
@@ -593,6 +624,11 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
593
624
594
625
if config .Inbound .GitHub .AllowCodeAccess {
595
626
config .Inbound .Allowlist = append (config .Inbound .Allowlist ,
627
+ AllowlistItem {
628
+ URL : gitHubBaseUrl .JoinPath ("/repos/:org/:repo/contents" ).String (),
629
+ Methods : ParseHttpMethods ([]string {"GET" }),
630
+ SetRequestHeaders : headers ,
631
+ },
596
632
// get contents of file
597
633
AllowlistItem {
598
634
URL : gitHubBaseUrl .JoinPath ("/repos/:org/:repo/contents/*" ).String (),
0 commit comments