if (-d "$dir") {
local $CWD = $dir;
- $self->message("++> $dir");
+ $self->message("fetch --all $dir");
Git::Repository->run(fetch => '--all');
return $self;
}
- $self->message("==> $dir");
+ $self->message("clone --mirror $dir");
mkpath $dir;
Git::Repository->run(clone => '--mirror' => $url => $dir);
my @fetch;
foreach my $fork (@{$self->forks}) {
if ($remotes =~ /$fork->{full_name}/) {
- $self->message("--- ". $fork->{full_name});
+ $self->message("have ". $fork->{full_name});
next;
}
- $self->message("+++ ". $fork->{full_name});
+ $self->message("remote add ". $fork->{full_name});
Git::Repository->run(remote => add => $fork->{full_name} => $fork->{clone_url});
push @fetch, $fork->{full_name};
}
foreach my $fork (@fetch) {
- $self->message("--> $fork");
+ $self->message("fetch $fork");
Git::Repository->run(fetch => $fork);
}
local $CWD = $dir;
foreach my $issue (@{$self->issues}) {
my $number = $issue->{number};
- $self->message("+++ issue/$number");
+ $self->message("save issue/$number");
open my $fh, ">$number.json";
print $fh $json->encode($issue);