Skip to content

Commit eacaf29

Browse files
authored
add more urls to ghe allowlist (#68)
1 parent e776067 commit eacaf29

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ Under the hood, this config adds these allowlist items:
9494
- GET `https://github.example.com/api/v3/repos/:owner/:repo`
9595
- GET `https://github.example.com/api/v3/repos/:owner/:repo/pulls`
9696
- GET `https://github.example.com/api/v3/orgs/:org/installation`
97+
- GET `https://github.example.com/api/v3/orgs/:org/installation/repositories`
98+
- GET `https://github.example.com/api/v3/app`
99+
- POST `https://github.example.com/api/v3/app-manifests/:code/conversions`
97100
- POST `https://github.example.com/api/v3/repos/:owner/:repo/pulls/:number/comments`
98101
- POST `https://github.example.com/api/v3/repos/:owner/:repo/issues/:number/comments`
99102

pkg/config.go

+18
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,24 @@ func LoadConfig(configFiles []string) (*Config, error) {
308308
URL: gitHubBaseUrl.JoinPath("/orgs/:org/installation").String(),
309309
Methods: ParseHttpMethods([]string{"GET"}),
310310
SetRequestHeaders: headers,
311+
},
312+
// check repo installation
313+
AllowlistItem{
314+
URL: gitHubBaseUrl.JoinPath("/orgs/:org/installation/repositories").String(),
315+
Methods: ParseHttpMethods([]string{"GET"}),
316+
SetRequestHeaders: headers,
317+
},
318+
// initiate app installation
319+
AllowlistItem{
320+
URL: gitHubBaseUrl.JoinPath("/app-manifests/:code/conversions").String(),
321+
Methods: ParseHttpMethods([]string{"POST"}),
322+
SetRequestHeaders: headers,
323+
},
324+
// get app installation
325+
AllowlistItem{
326+
URL: gitHubBaseUrl.JoinPath("/app").String(),
327+
Methods: ParseHttpMethods([]string{"GET"}),
328+
SetRequestHeaders: headers,
311329
})
312330
}
313331

0 commit comments

Comments
 (0)