From 327803ebe0e09b657e5dc7aa9f8d02521c164526 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 12 Jul 2025 14:22:52 +0300 Subject: fix: remove verbose token loading messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Only show warnings when no token is found at all - Silent token loading from files when successful 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/cli/release.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/cli') diff --git a/internal/cli/release.go b/internal/cli/release.go index e861533..b47476a 100644 --- a/internal/cli/release.go +++ b/internal/cli/release.go @@ -44,10 +44,10 @@ func HandleCheckReleasesForRepos(cfg *config.Config, flags *Flags, repositories // Try config token first, then fallback to env var and file token := githubOrg.GitHubToken if token == "" { - fmt.Println("No GitHub token in config, checking environment variable...") + // Try environment variable token = os.Getenv("GITHUB_TOKEN") if token == "" { - fmt.Println("No GITHUB_TOKEN env var, checking ~/.gitsyncer_github_token file...") + // Try token file home, err := os.UserHomeDir() if err == nil { tokenFile := filepath.Join(home, ".gitsyncer_github_token") @@ -75,10 +75,10 @@ func HandleCheckReleasesForRepos(cfg *config.Config, flags *Flags, repositories // Try config token first, then fallback to env var and file token := codebergOrg.CodebergToken if token == "" { - fmt.Println("No Codeberg token in config, checking environment variable...") + // Try environment variable token = os.Getenv("CODEBERG_TOKEN") if token == "" { - fmt.Println("No CODEBERG_TOKEN env var, checking ~/.gitsyncer_codeberg_token file...") + // Try token file home, err := os.UserHomeDir() if err == nil { tokenFile := filepath.Join(home, ".gitsyncer_codeberg_token") -- cgit v1.2.3