Net::GitHub::V2::Commits - GitHub Commits API
use Net::GitHub::V2::Commits; my $github_commits = Net::GitHub::V2::Commits->new( owner => 'fayland', # GitHub username/organisation repo => 'perl-net-github', # Repository name );
http://develop.github.com/p/commits.html
See also Net::GitHub for how to create a Net::GitHub object with the appropriate attributes, then get a Net::GitHub::V2::Commits object from it easily.
Net::GitHub::V2::Commits
my $commits = $github_commits->branch(); # default as 'master' my $commits = $github_commits->branch('v2');
list commits for a branch
my $commits = $github_commits->file( 'master', 'lib/Net/GitHub.pm' ); my $commits = $github_commits->file( 'lib/Net/GitHub.pm' ); # the same as above
get all the commits that modified the file (default $branch to 'master')
my $commit = $github_commits->show( '9bd63ae2114e3c7e4279b81ab2d8d8947ab4011d' );
get the changes introduced on a specific commit
(As usual, the SHA can be abbreviated)
Fayland Lam, <fayland at gmail.com>
<fayland at gmail.com>
Copyright 2009 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::GitHub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::GitHub
CPAN shell
perl -MCPAN -e shell install Net::GitHub
For more information on module installation, please visit the detailed CPAN module installation guide.