Skip to content

Commit

Permalink
GitHub SCM: Add app installation access token endpoint (#81)
Browse files Browse the repository at this point in the history
---------
Signed-off-by: Alexis Grant <[email protected]>
  • Loading branch information
armchairlinguist authored Aug 9, 2024
1 parent db4525e commit b1160b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Under the hood, this config adds these allowlist items:
- GET `https://github.example.com/api/v3/users/:user/installation`
- GET `https://github.example.com/api/v3/users/:user/installation/repositories`
- GET `https://github.example.com/api/v3/app`
- POST `https://github.example.com/api/v3/app/installations/:id/access_tokens
- 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
5 changes: 5 additions & 0 deletions pkg/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ func LoadConfig(configFiles []string, deploymentId int) (*Config, error) {
URL: gitHubBaseUrl.JoinPath("/app").String(),
Methods: ParseHttpMethods([]string{"GET"}),
SetRequestHeaders: headers,
},
AllowlistItem{
URL: gitHubBaseUrl.JoinPath("/app/installations/:id/access_tokens").String(),
Methods: ParseHttpMethods([]string{"POST"}),
SetRequestHeaders: headers,
})

if config.Inbound.GitHub.AllowCodeAccess {
Expand Down

0 comments on commit b1160b8

Please sign in to comment.