Pithub::PullRequests(3)

NAME
Pithub::PullRequests - Github v3 Pull Requests API

VERSION
version 0.01043

METHODS

  comments
Provides access to Pithub::PullRequests::Comments.

  reviewers
Provides 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>

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.