Skip to content

Commit

Permalink
add more urls to ghe allowlist (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekkhimani authored May 2, 2024
1 parent e776067 commit eacaf29
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Under the hood, this config adds these allowlist items:
- GET `https://github.example.com/api/v3/repos/:owner/:repo`
- GET `https://github.example.com/api/v3/repos/:owner/:repo/pulls`
- GET `https://github.example.com/api/v3/orgs/:org/installation`
- GET `https://github.example.com/api/v3/orgs/:org/installation/repositories`
- GET `https://github.example.com/api/v3/app`
- POST `https://github.example.com/api/v3/app-manifests/:code/conversions`
- POST `https://github.example.com/api/v3/repos/:owner/:repo/pulls/:number/comments`
- POST `https://github.example.com/api/v3/repos/:owner/:repo/issues/:number/comments`

Expand Down
18 changes: 18 additions & 0 deletions pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,24 @@ func LoadConfig(configFiles []string) (*Config, error) {
URL: gitHubBaseUrl.JoinPath("/orgs/:org/installation").String(),
Methods: ParseHttpMethods([]string{"GET"}),
SetRequestHeaders: headers,
},
// check repo installation
AllowlistItem{
URL: gitHubBaseUrl.JoinPath("/orgs/:org/installation/repositories").String(),
Methods: ParseHttpMethods([]string{"GET"}),
SetRequestHeaders: headers,
},
// initiate app installation
AllowlistItem{
URL: gitHubBaseUrl.JoinPath("/app-manifests/:code/conversions").String(),
Methods: ParseHttpMethods([]string{"POST"}),
SetRequestHeaders: headers,
},
// get app installation
AllowlistItem{
URL: gitHubBaseUrl.JoinPath("/app").String(),
Methods: ParseHttpMethods([]string{"GET"}),
SetRequestHeaders: headers,
})
}

Expand Down

0 comments on commit eacaf29

Please sign in to comment.