Skip to content

Commit

Permalink
Merge pull request #175 from chrisgavin/suppress-extra-logging
Browse files Browse the repository at this point in the history
Suppress extra logging from the retrying client.
  • Loading branch information
chrisgavin authored Oct 2, 2024
2 parents a24df16 + 31d17cb commit 124b73d
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 124b73d

Please sign in to comment.