Skip to content

Commit

Permalink
chore: more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Oct 24, 2024
1 parent 949b385 commit 6efbf90
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions scm/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func New(opts ...ClientOpt) (*client, error) {
return nil, fmt.Errorf("failed to parse RSA private key: %w", err)
}

fmt.Println("using custom round tripper")
transport := NewAppsTransportFromPrivateKey(http.DefaultTransport, c.config.AppID, privateKey)

transport.BaseURL = c.config.API
Expand Down Expand Up @@ -274,7 +273,6 @@ func (c *client) newGithubAppInstallationRepoToken(ctx context.Context, r *api.R
return t.GetToken(), nil
}

// todo: pagination?
// list all installations (a.k.a. orgs) where the GitHub App is installed
installations, _, err := client.Apps.ListInstallations(context.Background(), &github.ListOptions{})
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion scm/github/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,6 @@ func (c *client) GetNetrcPassword(ctx context.Context, r *api.Repo, u *api.User,
logrus.Infof("getting netrc password")

// the app might not be installed
// todo: pass in THIS repo to only get access to that repo
// https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
// maybe take an optional list of repos and permission set that is driven by yaml
t, err := c.newGithubAppInstallationRepoToken(ctx, r, repositories, map[string]string{})
Expand Down

0 comments on commit 6efbf90

Please sign in to comment.