Pithub::Repos::Releases(3pm)

Pithub::Repos::Releases3pm

Github v3 repo releases api

Version

version 0.01043

Methods

assets

Provides access to Pithub::Repos::Releases::Assets.

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:

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.

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,
    );

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Author

Johannes Plunien <[email protected]>

From libpithub-perl 0.01043-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.