Skip to content

Commit aea2dd0

Browse files
Add fetch for installation repos (#94)
--------- Signed-off-by: Alexis Grant <[email protected]>
1 parent 2bee49a commit aea2dd0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Under the hood, this config adds these allowlist items:
9898
- GET `https://github.example.com/api/v3/repos/:owner/:repo/pulls`
9999
- GET `https://github.example.com/api/v3/orgs/:org/installation`
100100
- GET `https://github.example.com/api/v3/orgs/:org/repos`
101+
- GET `https://github.example.com/api/v3/installation/repositories`
101102
- GET `https://github.example.com/api/v3/users/:user/installation`
102103
- GET `https://github.example.com/api/v3/users/:user/installation/repositories`
103104
- GET `https://github.example.com/api/v3/app`

pkg/config.go

+6
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,12 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
452452
Methods: ParseHttpMethods([]string{"GET"}),
453453
SetRequestHeaders: headers,
454454
},
455+
// alternative: check repos for an installation
456+
AllowlistItem{
457+
URL: gitHubBaseUrl.JoinPath("/installation/repositories").String(),
458+
Methods: ParseHttpMethods([]string{"GET"}),
459+
SetRequestHeaders: headers,
460+
},
455461
// check app installation for a personal account
456462
AllowlistItem{
457463
URL: gitHubBaseUrl.JoinPath("/users/:user/installation").String(),

0 commit comments

Comments
 (0)