diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 10:58:30 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 10:58:30 +0300 |
| commit | 7b462564b3fad233701347c6087aa52feaba2b25 (patch) | |
| tree | 66827366d41648f3e125737dca1596001acd1088 /internal/cli/sync_handlers.go | |
| parent | 714e81e56b3e8d49359c8098ec85dbaac8f74d4c (diff) | |
test(cli): cover mq factory init/public handler branches
Diffstat (limited to 'internal/cli/sync_handlers.go')
| -rw-r--r-- | internal/cli/sync_handlers.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/cli/sync_handlers.go b/internal/cli/sync_handlers.go index df0b6b0..dd08af6 100644 --- a/internal/cli/sync_handlers.go +++ b/internal/cli/sync_handlers.go @@ -348,6 +348,10 @@ func initGitHubClientWithFactory(cfg *config.Config, factory repoClientFactory) fmt.Printf("Initializing GitHub client for organization: %s\n", githubOrg.Name) githubClient := factory.NewGitHubRepoClient(githubOrg.GitHubToken, githubOrg.Name) + if githubClient == nil { + fmt.Println("Warning: GitHub client initialization returned nil") + return nil + } if !githubClient.HasToken() { fmt.Println("Warning: No GitHub token found. Cannot create repositories.") return nil @@ -375,6 +379,10 @@ func initCodebergClientWithFactory(cfg *config.Config, factory repoClientFactory fmt.Printf("Initializing Codeberg client for organization: %s\n", codebergOrg.Name) codebergClient := factory.NewCodebergRepoClient(codebergOrg.CodebergToken, codebergOrg.Name) + if codebergClient == nil { + fmt.Println("Warning: Codeberg client initialization returned nil") + return nil + } if !codebergClient.HasToken() { fmt.Println("Warning: No Codeberg token found. Cannot create repositories.") return nil |
