From a17caa6233def46c36cb5a3f4e9c335205b16496 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:12:53 +0200 Subject: [PATCH] Fix close friends max per page #9 Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- github-recon/username/close-friends.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-recon/username/close-friends.go b/github-recon/username/close-friends.go index ef3d1ec..4978308 100644 --- a/github-recon/username/close-friends.go +++ b/github-recon/username/close-friends.go @@ -30,7 +30,7 @@ const ( // 3. The candidate follows the target back (+1 point). // 4. The candidate shares at least one organization with the target (+1 point). func CloseFriends(s github_recon_settings.Settings) (results CloseFriendsResult) { - targetFollowing, resp, err := s.Client.Users.ListFollowing(s.Ctx, s.Target, nil) + targetFollowing, resp, err := s.Client.Users.ListFollowing(s.Ctx, s.Target, &github.ListOptions{PerPage: 100}) if err != nil { s.Logger.Error("Failed to fetch target's following list", "err", err) return @@ -43,7 +43,7 @@ func CloseFriends(s github_recon_settings.Settings) (results CloseFriendsResult) targetOrgs = []*github.Organization{} } - if len(targetFollowing) >= maxTargetFollowing { + if len(targetFollowing) > maxTargetFollowing { s.Logger.Info("Skipping close friends check", "reason", fmt.Sprintf("Target follows %d or more users (limit: %d)", len(targetFollowing), maxTargetFollowing),