Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
use v5.18;
use Net::GitHub;
use Encode qw/encode_utf8/;
my $github = Net::GitHub->new( # Net::GitHub::V3
access_token => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
);
my $repos = $github->repos;
$repos->set_default_user_repo('myname', 'my-repository');
my @releases = $repos->releases();
for my $r (@releases) {
open my $fh, '>' , "release-" . $r->{tag_name} or die $!;
print $fh encode_utf8 $r->{body};
close $fh or die $!;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment