API-GitForge

 view release on metacpan or  search on metacpan

lib/App/git/clean_forge_fork.pm  view on Meta::CPAN

use Try::Tiny;
use Cwd;

my $exit_main = 0;

CORE::exit main unless caller;


sub main {
    shift if $_[0] and ref $_[0] eq "";
    local @ARGV = @{ $_[0] } if $_[0] and ref $_[0] ne "";

    my $term     = Term::ReadLine->new("brand");
    my $upstream = "origin";
    my $git      = Git::Wrapper->new(getcwd);
    #<<<
    try {
        $git->rev_parse({ git_dir => 1 });
    } catch {
        die "pwd doesn't look like a git repository ..\n";
    };

lib/App/git/clean_forge_repo.pm  view on Meta::CPAN

use API::GitForge qw(new_from_domain forge_access_token remote_forge_info);
use Try::Tiny;

my $exit_main = 0;

CORE::exit main unless caller;


sub main {
    shift if $_[0] and ref $_[0] eq "";
    local @ARGV = @{ $_[0] } if $_[0] and ref $_[0] ne "";

    my $term   = Term::ReadLine->new("brand");
    my $remote = "origin";
    my $git    = Git::Wrapper->new(getcwd);
    #<<<
    try {
        $git->rev_parse({ git_dir => 1 });
    } catch {
        die "pwd doesn't look like a git repository ..\n";
    };

lib/App/git/nuke_forge_fork.pm  view on Meta::CPAN

use Cwd;
use Term::UI;

my $exit_main = 0;

CORE::exit main unless caller;


sub main {
    shift if $_[0] and ref $_[0] eq "";
    local @ARGV = @{ $_[0] } if $_[0] and ref $_[0] ne "";

    my $term     = Term::ReadLine->new("brand");
    my $upstream = "origin";
    my $git      = Git::Wrapper->new(getcwd);
    #<<<
    try {
        $git->rev_parse({ git_dir => 1 });
    } catch {
        die "pwd doesn't look like a git repository ..\n";
    };



( run in 0.447 second using v1.01-cache-2.11-cpan-49f99fa48dc )