Skip to content

Commit

Permalink
GitHub: don't fail if a user has no SSH keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
attilaolah committed Jun 26, 2024
1 parent c75261a commit 5f64689
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/github/sshkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ func ResolveSSHKeys(ctx context.Context, usernames []string) (map[string][]strin
return nil, fmt.Errorf("failed to fetch SSH keys for GitHub user %q: %w", username, err)
}

if len(keys) == 0 {
zerolog.Ctx(ctx).Warn().Str("username", username).Dur("took", time.Since(t)).Msg("No keys found")
continue
}

m[username] = keys

zerolog.Ctx(ctx).Info().Str("username", username).Dur("took", time.Since(t)).Msg("Resolved keys")
Expand Down

0 comments on commit 5f64689

Please sign in to comment.