diff --git a/gh/client.go b/gh/client.go index 8c74557..221cc55 100644 --- a/gh/client.go +++ b/gh/client.go @@ -44,16 +44,16 @@ func newClient(ctx context.Context, owner, repo string) (*client, error) { _, tokenSource := auth.TokenForHost(host) token, v3ep, _, _ := factory.GetTokenAndEndpoints() if token == "" { - slog.Info("No credentials found, access without credentials", slog.String("endpoint", v3ep), slog.String("owner", owner), slog.String("repo", repo)) + slog.Info("No credentials found, access without credentials", slog.String("endpoint", v3ep), slog.String("owner", owner), slog.String("repo", repo), slog.String("host_source", hostSource)) return newNoAuthClient(ctx, owner, repo, v3ep) } slog.Info("Access with credentials", slog.String("endpoint", v3ep), slog.String("owner", owner), slog.String("repo", repo), slog.String("host_source", hostSource), slog.String("token_source", tokenSource)) - gc, err := factory.NewGithubClient(factory.SkipAuth(true)) + gc, err := factory.NewGithubClient() if err != nil { return nil, err } if _, _, err := gc.Repositories.Get(ctx, owner, repo); err != nil { - slog.Info("Authentication failed, access without credentials", slog.String("endpoint", v3ep), slog.String("owner", owner), slog.String("repo", repo), slog.String("host_source", hostSource), slog.String("token_source", tokenSource)) + slog.Info("Authentication failed, access without credentials", slog.String("error", err.Error()), slog.String("endpoint", v3ep), slog.String("owner", owner), slog.String("repo", repo), slog.String("host_source", hostSource), slog.String("token_source", tokenSource)) return newNoAuthClient(ctx, owner, repo, v3ep) } hc, err := api.DefaultHTTPClient()