mirror of
https://github.com/anotherhadi/github-recon.git
synced 2026-10-05 10:58:25 +02:00
Fix close friends max per page #9
Signed-off-by: Hadi <[email protected]>
This commit is contained in:
@@ -30,7 +30,7 @@ const (
|
|||||||
// 3. The candidate follows the target back (+1 point).
|
// 3. The candidate follows the target back (+1 point).
|
||||||
// 4. The candidate shares at least one organization with the target (+1 point).
|
// 4. The candidate shares at least one organization with the target (+1 point).
|
||||||
func CloseFriends(s github_recon_settings.Settings) (results CloseFriendsResult) {
|
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 {
|
if err != nil {
|
||||||
s.Logger.Error("Failed to fetch target's following list", "err", err)
|
s.Logger.Error("Failed to fetch target's following list", "err", err)
|
||||||
return
|
return
|
||||||
@@ -43,7 +43,7 @@ func CloseFriends(s github_recon_settings.Settings) (results CloseFriendsResult)
|
|||||||
targetOrgs = []*github.Organization{}
|
targetOrgs = []*github.Organization{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(targetFollowing) >= maxTargetFollowing {
|
if len(targetFollowing) > maxTargetFollowing {
|
||||||
s.Logger.Info("Skipping close friends check",
|
s.Logger.Info("Skipping close friends check",
|
||||||
"reason",
|
"reason",
|
||||||
fmt.Sprintf("Target follows %d or more users (limit: %d)", len(targetFollowing), maxTargetFollowing),
|
fmt.Sprintf("Target follows %d or more users (limit: %d)", len(targetFollowing), maxTargetFollowing),
|
||||||
|
|||||||
Reference in New Issue
Block a user