summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-12 14:22:52 +0300
committerPaul Buetow <paul@buetow.org>2025-07-12 14:22:52 +0300
commit327803ebe0e09b657e5dc7aa9f8d02521c164526 (patch)
tree679db1c8681b0cb68b00583619b005879e68df31
parentb3b599b7b645f7fab6fd8c22e8475a054b137225 (diff)
fix: remove verbose token loading messages
- 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 <noreply@anthropic.com>
-rw-r--r--internal/cli/release.go8
1 files changed, 4 insertions, 4 deletions
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")