summaryrefslogtreecommitdiff
path: root/lib/githubexplorer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/githubexplorer/Profile.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/githubexplorer/Profile.pm b/lib/githubexplorer/Profile.pm
index f580f79..d4024df 100644
--- a/lib/githubexplorer/Profile.pm
+++ b/lib/githubexplorer/Profile.pm
@@ -6,6 +6,7 @@ use Net::GitHub::V2::Users;
sub fetch_profile {
my ( $self, $login, $depth ) = @_;
+ return if $depth > 2;
my $profile = $self->_profile_exists($login);
say "fetch profile for $login ($depth)...";
@@ -28,9 +29,8 @@ sub fetch_profile {
}
my $followers = $github->followers();
my $local_depth = $depth + 1;
- return $profile if $local_depth > 3;
foreach my $f (@$followers) {
- my $p = $self->fetch_profile( $f, $depth + 1 );
+ my $p = $self->fetch_profile( $f, $local_depth );
next unless $p;
$self->schema->resultset('Follow')
->create(