go-sdk icon indicating copy to clipboard operation
go-sdk copied to clipboard

GitHub Apps Proof of Concept

Open kfcampbell opened this issue 2 months ago • 5 comments

This PR is pending some discussion and decisions:

  • Do we want to wrap GitHub App authentication in this SDK, or do BYO JWT token?
  • How should the examples be structured?
  • Are we comfortable using the ghinstallation library?

The API for Apps initialization looks like:

client, err := pkg.NewApiClient(
    // provide path to pem file, app ID, and installation ID
    pkg.WithGitHubAppAuthentication("/home/kfcampbell/github/dev/go-sdk/kfcampbell-terraform-provider.2024-04-30.private-key.pem", 131977, 20570954),
)

if err != nil {
    log.Fatalf("error creating client: %v", err)
}

kfcampbell avatar May 01 '24 00:05 kfcampbell