Dist-Zilla-PluginBundle-Author-GETTY
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Author/GETTY/GitHubRelease.pm view on Meta::CPAN
tag_name => "$tag",
target_commitish => $branch,
name => $title,
body => $notes,
draft => \1,
prerelease => $self->zilla->is_trial ? \1 : \0,
generate_release_notes => $self->{github_notes} ? \1 : \0,
}
);
die "Discussion category name is invalid" if ($release->code eq '404');
die "Validation failed, or the endpoint has been spammed." if ($release->code eq '422');
die "login ($identity{login}) or token invalid for the specified repository ($releases->{repo})\n"
if ($release->code eq '403');
my $release_id = $release->content->{id};
die "Unable to create GitHub release\n" unless defined $release_id;
$self->log("Draft release created at $releases->{repo} for $identity{login}");
my $asset = $releases->assets->create(
release_id => $release_id,
name => $filename,
lib/Dist/Zilla/PluginBundle/Author/GETTY/Docker.pm view on Meta::CPAN
Build-time argument (C<--build-arg>). Multi-value â repeat the key to set
multiple arguments.
=head2 label
Image label. Multi-value.
=head2 platform
Target platform (C<--platform>), exactly one. A second value is refused by
C<Docker::API>: its build endpoint takes one platform.
=head2 build_verbose, pull, no_cache, rm, force_rm, fail_if_tag_exists, skip_latest_on_trial
Passed through directly to L<Dist::Zilla::Plugin::Docker::API>.
=head1 SUPPORT
=head2 Issues
Please report bugs and feature requests at
lib/Pod/Elemental/Transformer/Author/GETTY.pm view on Meta::CPAN
=item *
C<=hook> - for documenting hooks
=item *
C<=example> - for documenting examples
=item *
C<=resource> - for documenting resources, features or API endpoints
=item *
C<=event> - for documenting events
=back
=head1 SUPPORT
=head2 Issues
lib/Pod/Weaver/PluginBundle/Author/GETTY.pm view on Meta::CPAN
Documents exported functions. Place near the function definition.
=func parse_config
my $config = parse_config($filename);
Parse a configuration file and return a hashref.
=head2 =resource
Documents available resources, features, or API endpoints.
=resource servers
Cloud servers (create, delete, power on/off)
=head2 =opt
Documents command-line options for CLI tools.
=opt --verbose
misc/agent-context/.claude/skills/getty-perl-pod/SKILL.md view on Meta::CPAN
transformer does not handle them â do not use them until it does.
```perl
has server => ( is => 'ro', required => 1, coerce => ... );
=attr server
Required. L<Kubernetes::REST::Server> instance or hashref with the connection
configuration.
server => { endpoint => 'https://kubernetes.local:6443' }
=cut
sub list { ... }
=method list
my $pods = $api->list('Pod', namespace => 'default');
Returns ...
t/binary-provenance.t view on Meta::CPAN
shift \@a if \@a && \$a[0] eq 'api';
my (\$ep, \$jq);
while (\@a) {
my \$x = shift \@a;
if (\$x =~ /\\A(?:-H|--header|-X|--method|-f|-F|--hostname|--cache)\\z/) { shift \@a }
elsif (\$x =~ /\\A(?:-q|--jq)\\z/) { \$jq = shift \@a }
elsif (\$x =~ /\\A--jq=(.*)\\z/s) { \$jq = \$1 }
elsif (\$x =~ /\\A-/) { }
else { \$ep //= \$x }
}
die "fake gh: no endpoint\\n" unless defined \$ep;
\$ep =~ s{\\A/}{};
(my \$file = "\$ENV{FAKE_GH}/\$ep.json") =~ s{(?<=\\A\$ENV{FAKE_GH}/)(.*)\\.json\\z}{ (my \$n = \$1) =~ s{/}{_}g; "\$n.json" }e;
unless (-f \$file) { print STDERR "gh: Not Found (HTTP 404)\\n"; exit 1 }
open my \$fh, '<', \$file or die; my \$json = do { local \$/; <\$fh> };
my \$data = JSON::PP->new->decode(\$json);
unless (defined \$jq) { print JSON::PP->new->canonical->encode(\$data), "\\n"; exit 0 }
sub path { my (\$p) = \@_; my \$v = \$data; for my \$k (grep { length } split /\\./, \$p) { \$v = ref \$v eq 'HASH' ? \$v->{\$k} : undef } return defined \$v ? \$v : '' }
my \$out;
if (\$jq =~ /\\A"(.*)"\\z/s) { (\$out = \$1) =~ s/\\\\\\(([.\\w]+)\\)/path(\$1)/ge }
elsif (\$jq =~ /\\A[.\\w]+\\z/) { \$out = path(\$jq) }
t/binary-provenance.t view on Meta::CPAN
my ($env) = fake_env(FAKE_INSPECT_FAIL => 1, PLATFORM => 'linux-x86_64', BIN_NAME => 'foo', ASSET => 'foo-1.0-linux-x86_64',
SMOKE => 'foo --version', IMAGE => 'almalinux:8', RUNNER_LABEL => 'ubuntu-24.04', BUNDLE_COMMIT => $WF, GITHUB_RUN_ATTEMPT => '1',
ImageOS => 'ubuntu24', ImageVersion => '1', RUNNER_OS => 'Linux', RUNNER_ARCH => 'X64');
my ($rc) = facts($env, 'smoke', "$d/smoke-0.txt", "$d/bins/foo-1.0-linux-x86_64");
is($rc, 1, 'facts_smoke_inspect_fails: docker image inspect failing makes facts.sh exit 1');
}
{ my ($rc) = facts({}, 'bogus'); is($rc, 1, 'facts_usage: an unknown subcommand exits 1') }
# plan: gh is faked, the tag chain comes from canned API answers
sub gh_dir {
my (%ep) = @_; # endpoint => data
my $d = tempdir(CLEANUP => 1);
for my $e (keys %ep) { (my $n = $e) =~ s{/}{_}g; spew("$d/$n.json", JSON::PP->new->encode($ep{$e})) }
return $d;
}
sub plan_env {
my (%e) = @_;
# the superset of names the design leaves open for BUNDLE_*/WORKFLOW_*/CALLER_*
return (
TAG => 'v1.0', VERSION_SLOT => '1.0', GH_TOKEN => 'x',
GITHUB_SERVER_URL => 'https://github.com', GITHUB_REPOSITORY => 'Getty/Foo-Bar', GITHUB_RUN_ID => '4242',
( run in 1.127 second using v1.01-cache-2.11-cpan-eb134014566 )