my $github_commits = Net::GitHub::V2::Commits->new(
owner => 'fayland', # GitHub username/organisation
repo => 'perl-net-github', # Repository name
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.
my $commits = $github_commits->branch(); # default as 'master' my $commits = $github_commits->branch('v2');
list commits for a branch
- file($branch, $file)
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)
AUTHORFayland Lam, "<fayland at gmail.com>"
COPYRIGHT & LICENSECopyright 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.