GitHub-Crud
view release on metacpan or search on metacpan
lib/GitHub/Crud.pm view on Meta::CPAN
$g->title = $title;
$g->body = $body;
$g->personalAccessTokenFolder = $accessFolderOrToken;
$g->loadPersonalAccessToken;
$g->confessOnFailure = 1;
$g->createIssue;
}
sub currentRepo() # Create a github object for the current repo if we are on github actions
{if (my $r = $ENV{GITHUB_REPOSITORY}) # We are on GitHub
{my ($user, $repo) = split m(/), $r, 2;
my $g = GitHub::Crud::new;
$g->userid = $user;
$g->repository = $repo;
$g->personalAccessToken = $ENV{GITHUB_TOKEN};
$g->confessOnFailure = 1;
if (!$g->personalAccessToken)
{confess "Unable to load github token for repository $r from environment variable: GITHUB_TOKEN\nSee: https://github.com/philiprbrenan/postgres/blob/main/.github/workflows/main.yml";
}
( run in 2.785 seconds using v1.01-cache-2.11-cpan-71847e10f99 )