Pithub...quests(3pm)

πŸ“¦
version 0.01043 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Pithub::PullRequests β€” the manual, but make it cute πŸ’–

okay bestie, sit down, hydrate, because we're diving into Pithub::PullRequests, which is the Github v3 Pull Requests API wrapper, from the Pithub family. Manual name's Pithub...quests (3pm), User Contributed Perl Documentation β€” yes the truncation is giving cryptic but we move. πŸ’…


✨ VERSION ✨

version 0.01043 πŸŽ€


🌸 METHODS 🌸

πŸ¦‹ comments

Gives you access to Pithub::PullRequests::Comments. Go off, queen. πŸ’¬

πŸ¦‹ reviewers

Gives you access to Pithub::PullRequests::Reviewers. πŸ‘‘

πŸ¦‹ commits

  • List commits on a pull request
GET /repos/:user/:repo/pulls/:id/commits

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->commits(
    user            => 'plu',
    repo            => 'Pithub',
    pull_request_id => 1
);

πŸ¦‹ create

  • Create a pull request
POST /repos/:user/:repo/pulls

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->create(
    user   => 'plu',
    repo => 'Pithub',
    data   => {
        base  => 'master',
        body  => 'Please pull this in!',
        head  => 'octocat:new-feature',
        title => 'Amazing new feature',
    }
);

πŸ¦‹ files

  • List pull requests files
GET /repos/:user/:repo/pulls/:id/files

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->files(
    user            => 'plu',
    repo            => 'Pithub',
    pull_request_id => 1,
);

πŸ¦‹ get

  • Get a single pull request
GET /repos/:user/:repo/pulls/:id

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->get(
    user            => 'plu',
    repo            => 'Pithub',
    pull_request_id => 1,
);

πŸ¦‹ is_merged

  • Get if a pull request has been merged
GET /repos/:user/:repo/pulls/:id/merge

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->is_merged(
    user            => 'plu',
    repo            => 'Pithub',
    pull_request_id => 1,
);

πŸ¦‹ list

  • List pull requests
GET /repos/:user/:repo/pulls

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->list(
    user => 'plu',
    repo => 'Pithub',
    page => 2,
        # Defaults to page 1. Note that the GitHub API returns (a
        # maximum of) 100 results per page.
    state => 'open',
        # Defaults to 'open', other options are 'closed' and 'all'
);

πŸ¦‹ merge

  • Merge a pull request
PUT /repos/:user/:repo/pulls/:id/merge

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->merge(
    user            => 'plu',
    repo            => 'Pithub',
    pull_request_id => 1,
);

πŸ¦‹ update

  • Update a pull request
PATCH /repos/:user/:repo/pulls/:id

Examples:

my $p = Pithub::PullRequests->new;
my $result = $p->update(
    user            => 'plu',
    repo            => 'Pithub',
    pull_request_id => 1,
    data            => {
        base  => 'master',
        body  => 'Please pull this in!',
        head  => 'octocat:new-feature',
        title => 'Amazing new feature',
    }
);

πŸ‘‘ AUTHOR πŸ‘‘

Johannes Plunien <plu@cpan.org> πŸ’–


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 vibe, bestie 🫢 this was perl v5.40.1, dated 2025-06-08, and yes we really did just read Pithub...quests (3pm) together. slay. βœ¨πŸ’…

πŸ“¦ where this page comes from