prow/github/client.go
func NewClientWithFields(fields logrus.Fields, getToken func() []byte, graphqlEndpoint string, bases ...string) *Client {
	return &Client{
		logger: logrus.WithFields(fields).WithField("client", "github"),
		time:   &standardTime{},
		gqlc: githubql.NewEnterpriseClient(
			graphqlEndpoint,
			&http.Client{
				Timeout:   maxRequestTime,
				Transport: &oauth2.Transport{Source: newReloadingTokenSource(getToken)},
			}),
		client:   &http.Client{Timeout: maxRequestTime},
		bases:    bases,
		getToken: getToken,
		dry:      false,
	}
}
func NewClientWithFields(fields logrus.Fields, getToken func() []byte, graphqlEndpoint string, bases ...string) *Client {
	return &Client{
		logger: logrus.WithFields(fields).WithField("client", "github"),
		time:   &standardTime{},
		gqlc: githubql.NewEnterpriseClient(
			graphqlEndpoint,
			&http.Client{
				Timeout:   maxRequestTime,
				Transport: &oauth2.Transport{Source: newReloadingTokenSource(getToken)},
			}),
		client:   &http.Client{Timeout: maxRequestTime},
		bases:    bases,
		getToken: getToken,
		dry:      false,
	}
}
// NewClientWithFields creates a new fully operational GitHub client. With
// added logging fields.
// 'getToken' is a generator for the GitHub access token to use.
// 'bases' is a variadic slice of endpoints to use in order of preference.
//   An endpoint is used when all preceding endpoints have returned a conn err.
//   This should be used when using the ghproxy GitHub proxy cache to allow
//   this client to bypass the cache if it is temporarily unavailable.