The GitHub provider has been implemented. Creating a client will now look like this:
token := os.Getenv("GITHUB_TOKEN")
if token == "" {
log.Fatalf("GITHUB_TOKEN must be provided")
}
tokenProvider := auth.NewTokenProvider(
auth.WithAuthorizationToken(token))
/* other options: WithUserAgent, WithAPIVersion, or a user-defined function.
if not present, sensible defaults will be used */
adapter, err := http.NewNetHttpRequestAdapter(tokenProvider)
if err != nil {
log.Fatalf("Error creating request adapter: %v", err)
}
client := octokit.NewApiClient(adapter)
The GitHub provider has been implemented. Creating a client will now look like this: