-
-
17 Apr 2022 04:27:28 UTC
- Distribution: Net-GitHub
- Module version: 1.03
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (165 / 0 / 0)
- Kwalitee
Bus factor: 1- 28.39% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (43.36KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 52 contributors- Fayland Lam, C<< <fayland at gmail.com> >>
-
Alan Berndt
-
Alex Muntada
-
Alex Vandiver
-
brian d foy
-
c9s
-
Chris Nehren
-
Christine Spang
-
Chris Williams
-
Danijel Tasov
-
David Golden
-
David Precious
-
fayland
-
Finn Smith
-
franck cuny
-
Graham Knop
-
Grant McLean
-
gregor herrmann
-
Harald Jörg
-
hiroraba
-
Hristo Dragolov
-
Ioan Rogers
-
Jason Dorweiller
-
jddorweiler
-
Jesse Luehrs
-
Jesse Vincent
-
JJ Merelo
-
Johannes Kilian
-
John 'Warthog9' Hawley
-
Jonathan Gopel
-
J.R. Mash
-
Kevin Falcone
-
Kirk Kimmel
-
Leigh Hart
-
Lubomir Rintel
-
Makoto Sasaki
-
Michael G. Schwern
-
mikegrb
-
mschilli
-
nebulous
-
Neil Bowers
-
Nicolas R
-
PF4Public
-
sillymoose
-
sunnavy
-
Tim Vroom
-
Todd Rinaldo
-
unknown
-
Vincent Lequertier
-
Will Orr
-
Zak Wilcox
-
積丹尼 Dan Jacobson
NAME
Net::GitHub::V3::PullRequests - GitHub Pull Requests API
SYNOPSIS
use Net::GitHub::V3; my $gh = Net::GitHub::V3->new; # read L<Net::GitHub::V3> to set right authentication info my $pull_request = $gh->pull_request;
DESCRIPTION
To ease the keyboard, we provied two ways to call any method which starts with :user/:repo
1. SET user/repos before call methods below
$gh->set_default_user_repo('fayland', 'perl-net-github'); # take effects for all $gh-> $pull_request->set_default_user_repo('fayland', 'perl-net-github'); # only take effect to $gh->pull_request my @pulls = $pull_request->pulls();
2. If it is just for once, we can pass :user, :repo before any arguments
my @pulls = $pull_request->pulls($user, $repo);
METHODS
Pull Requets
http://developer.github.com/v3/pulls/
- pulls
-
my @pulls = $pull_request->pulls(); my @pulls = $pull_request->pulls( { state => 'open' } ); while (my $pr = $pull_request->next_pull( { state => 'open' } )) { ...; }
- pull
-
my $pull = $pull_request->pull($pull_number);
- create_pull
- update_pull
-
my $pull = $pull_request->create_pull( { "title" => "Amazing new feature", "body" => "Please pull this in!", "head" => "octocat:new-feature", "base" => "master" } ); my $pull = $pull_request->update_pull( $pull_number, $new_pull_data );
- commits
- files
-
my @commits = $pull_request->commits($pull_number); my @files = $pull_request->files($pull_number); while (my $commit = $pull_request->next_commit($pull_number)) { ...; } while (my $file = $pull_request->next_file($pull_number)) { ...; }
- is_merged
- merge
-
my $is_merged = $pull_request->is_merged($pull_number); my $result = $pull_request->merge($pull_number);
Pull Request Comments API
http://developer.github.com/v3/pulls/comments/
- comments
- comment
- create_comment
- update_comment
- delete_comment
-
my @comments = $pull_request->comments($pull_number); while (my $comment = $pull_request->next_comment($pull_number)) { ...; } my $comment = $pull_request->comment($comment_id); my $comment = $pull_request->create_comment($pull_number, { "body" => "a new comment", commit_id => '586fe4be94c32248043b344e99fa15c72b40d1c2', path => 'test', position => 1, }); my $comment = $pull_request->update_comment($comment_id, { "body" => "Nice change" }); my $st = $pull_request->delete_comment($comment_id);
Pull Request Reviews API
http://developer.github.com/v3/pulls/reviews/
- reviews
- review
- create_review
- update_review
- delete_review
-
my @reviews = $pull_request->reviews($pull_number); while (my $review = $pull_request->next_review($pull_number)) { ...; } my $review = $pull_request->review($review_id); my $review = $pull_request->create_review($pull_number, { "body" => "a new review", commit_id => '586fe4be94c32248043b344e99fa15c72b40d1c2', event => 'APPROVE', }); my $review = $pull_request->update_review($review_id, { "body" => "Nice change" }); my $st = $pull_request->delete_review($review_id);
Pull Request Review API
https://developer.github.com/v3/pulls/review_requests/
- reviewers
- add_reviewers
- delete_reviewers
-
my @reviewers = $pull_request->reviewers($pull_number); my $result = $pull_request->add_reviewers($pull_number, { reviewers => [$user1, $user2], team_reviewers => [$team1], ); my $result = $pull_request->delete_reviewers($pull_number, { reviewers => [$user1, $user2], team_reviewers => [$team1], );
AUTHOR & COPYRIGHT & LICENSE
Refer Net::GitHub
Module Install Instructions
To install Net::GitHub, copy and paste the appropriate command in to your terminal.
cpanm Net::GitHub
perl -MCPAN -e shell install Net::GitHub
For more information on module installation, please visit the detailed CPAN module installation guide.