Skip to content

Instantly share code, notes, and snippets.

@kizashi1122
Last active January 9, 2018 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kizashi1122/d36acf57c330bcd11b9f1bf508d26617 to your computer and use it in GitHub Desktop.
Save kizashi1122/d36acf57c330bcd11b9f1bf508d26617 to your computer and use it in GitHub Desktop.
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