App-GitHubUtils
view release on metacpan or search on metacpan
lib/App/GitHubUtils.pm view on Meta::CPAN
require IPC::System::Options;
require Browser::Open;
my $repo = `this-repo`;
return [412, "this-repo failed"] unless length $repo;
chomp($repo);
my $stdout;
IPC::System::Options::system(
{die=>1, log=>1, capture_stdout=>\$stdout},
"git", "config", "-l");
say $stdout;
$stdout =~ m!.*=.*github\.com:?/?([^/]+)/(.+?)(?:\.git)?$!im
or return [412, "Can't find github username and repository name from configuration"];
Browser::Open::open_browser("https://github.com/$1/$2");
[200];
}
1;
# ABSTRACT: Utilities related to GitHub
__END__
( run in 1.689 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )