NAME
Pithub::PullRequests
VERSION
version 0.01000
METHODS
commits
List commits on a pull request
GET /repos/:user/:repo/pulls/:id/commits
Examples:
$result = $p->pull_requests->commits(
user => 'plu',
repo => 'Pithub',
pull_request_id => 1
);
create
Create a pull request
POST /repos/:user/:repo/pulls
Examples:
$result = $p->pull_requests->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:
$result = $p->pull_requests->files(
user => 'plu',
repo => 'Pithub',
pull_request_id => 1,
);
get
Get a single pull request
GET /repos/:user/:repo/pulls/:id
Examples:
$result = $p->pull_requests->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:
$result = $p->pull_requests->is_merged(
user => 'plu',
repo => 'Pithub',
pull_request_id => 1,
);
list
List pull requests
GET /repos/:user/:repo/pulls
Examples:
$result = $p->pull_requests->list(
user => 'plu',
repo => 'Pithub'
);
merge
Merge a pull request
PUT /repos/:user/:repo/pulls/:id/merge
Examples:
$result = $p->pull_requests->merge(
user => 'plu',
repo => 'Pithub',
pull_request_id => 1,
);
update
Update a pull request
PATCH /repos/:user/:repo/pulls/:id
Examples:
$result = $p->pull_requests->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',
}
);