Skip to content

Commit

Permalink
Suppress extra logging from the retrying client.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgavin committed Oct 2, 2024
1 parent a24df16 commit 31d17cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/client/client.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package client

import (
"io"
"log"

"github.com/cli/go-gh"
"github.com/cli/go-gh/pkg/api"
"github.com/hashicorp/go-retryablehttp"
Expand All @@ -10,6 +13,7 @@ import (
func NewClient(host string) (api.RESTClient, error) {
retryableHTTPClient := retryablehttp.NewClient()
retryableHTTPClient.RetryMax = 5
retryableHTTPClient.Logger = log.New(io.Discard, "", log.LstdFlags)
retryableRoundTripper := retryablehttp.RoundTripper{Client: retryableHTTPClient}

client, err := gh.RESTClient(&api.ClientOptions{Host: host, Transport: &retryableRoundTripper})
Expand Down

0 comments on commit 31d17cb

Please sign in to comment.