Pithub::PullRequests - Github v3 Pull Requests API
version 0.01023
Provides access to Pithub::PullRequests::Comments.
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 a pull request
POST /repos/:user/:repo/pulls
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', } );
List pull requests files
GET /repos/:user/:repo/pulls/:id/files
my $p = Pithub::PullRequests->new; my $result = $p->files( user => 'plu', repo => 'Pithub', pull_request_id => 1, );
Get a single pull request
GET /repos/:user/:repo/pulls/:id
my $p = Pithub::PullRequests->new; my $result = $p->get( user => 'plu', repo => 'Pithub', pull_request_id => 1, );
Get if a pull request has been merged
GET /repos/:user/:repo/pulls/:id/merge
my $p = Pithub::PullRequests->new; my $result = $p->is_merged( user => 'plu', repo => 'Pithub', pull_request_id => 1, );
List pull requests
GET /repos/:user/:repo/pulls
my $p = Pithub::PullRequests->new; my $result = $p->list( user => 'plu', repo => 'Pithub' );
Merge a pull request
PUT /repos/:user/:repo/pulls/:id/merge
my $p = Pithub::PullRequests->new; my $result = $p->merge( user => 'plu', repo => 'Pithub', pull_request_id => 1, );
Update a pull request
PATCH /repos/:user/:repo/pulls/:id
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', } );
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.
To install Pithub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pithub
CPAN shell
perl -MCPAN -e shell install Pithub
For more information on module installation, please visit the detailed CPAN module installation guide.