Pithub...eleases(3pm)
π Pithub::Repos::Releases β the Github v3 Repo Releases API, but make it a vibe π
okay so bestie. this is a page from the User Contributed Perl Documentation (a 3pm manual page, iykyk), and it's all about Pithub::Repos::Releases, which is your lil doorway into the Github v3 Repo Releases API. releases!! the thing where you ship your code and pretend it was always stable β¨
πΈ VERSION πΈ
version 0.01043 β yes queen, that's the one π
β¨ METHODS β¨
π¦ assets
Provides access to Pithub::Repos::Releases::Assets. it's giving portal to another module, and honestly? iconic.
π list
- List releases for a repository.
GET /repos/:owner/:repo/releases
Examples:
my $r = Pithub::Repos::Releases->new;
my $result = $r->get(
repo => 'Pithub',
user => 'plu',
);
π get
- Get a single release.
GET /repos/:owner/:repo/releases/:id
Examples:
my $r = Pithub::Repos::Releases->new;
my $result = $r->get(
repo => 'Pithub',
user => 'plu',
release_id => 1,
);
π create
- Create a release.
POST /repos/:user/:repo/releases
Examples:
my $r = Pithub::Repos::Releases->new;
my $result = $r->create(
user => 'plu',
repo => 'Pithub',
data => {
tag_name => 'v1.0.0',
target_commitish => 'master',
name => 'v1.0.0',
body => 'Description of the release',
draft => JSON::MaybeXS::false(), # or alternative below
prerelease => JSON::MaybeXS::false(), # or alternative below
generate_release_notes => JSON::MaybeXS::false(), # or alternative below
}
);
π Booleans: the part that WILL humble you
Several of the attributes require boolean values in the request that is sent to GitHub. Zero (0) and one (1) are integers and will not be encoded correctly in the JSON encoded request.
no cap, this is the trap.0and1are integers, not booleans, and the JSON encoder will absolutely not do what you want. π
There are numerous options for your call to Pithub::Repos::Releases->create.
π«Ά JSON::MaybeXS
Add the following to your code before the call to Pithub::Repos::Releases->create.
require JSON::MaybeXS;
Then use the following values for the booleans:
JSON::MaybeXS::true()
JSON::MaybeXS::false()
π«Ά Cpanel::JSON::XS
Add the following to your code before the call to Pithub::Repos::Releases->create.
require Cpanel::JSON::XS;
Then use the following values for the booleans:
Cpanel::JSON::XS::true
Cpanel::JSON::XS::false
π«Ά JSON::PP
Add the following to your code before the call to Pithub::Repos::Releases->create.
require JSON::PP;
Then use the following values for the booleans:
$JSON::PP::true
$JSON::PP::false
π update
- Edit a release.
PATCH /repos/:user/:repo/releases/:id
Examples:
my $r = Pithub::Repos::Releases->new;
my $result = $r->update(
user => 'plu',
repo => 'Pithub',
release_id => 1,
data => {
tag_name => 'v1.0.0',
target_commitish => 'master',
name => 'v1.0.0',
body => 'Description of the release',
draft => 0,
prerelease => 0,
}
);
π delete
- Delete a release.
DELETE /repos/:user/:repo/releases:id
Examples:
my $r = Pithub::Repos::Releases->new;
my $result = $r->delete(
user => 'plu',
repo => 'Pithub',
release_id => 1,
);
π AUTHOR π
Johannes Plunien <plu@cpan.org> β the actual main character who wrote this π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Johannes Plunien.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie!! this one's running on perl v5.40.1, dated 2025-06-08, filed under Pithub...eleases(3pm) β so go forth, make releases, and pls pls pls use real booleans ππ
π¦ where this page comes from
- debian trixie: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms