Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'auto_paginate' attribute to Pithub::new() which allows 100+ repos
(fixes #3) - Add list(), returns the entire list of Github repo objects - Add --list, prints out the name of all of the fetched repositories - Add new tests for the above
- Loading branch information
Showing
5 changed files
with
118 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
Revision history for Github-Backup | ||
|
||
1.03 UNREL | ||
- | ||
- Added 'auto_pagination => 1' to Pithub instantiation which was limiting | ||
the number of repositories we operate on to 100 (fixes #3) | ||
- Added list(), returns a full list of repository objects | ||
- Added --list, prints to STDOUT the full list of available repository | ||
objects for the given user | ||
|
||
1.02 2018-02-12 | ||
- fix missing newline backslash in SYNOPSIS | ||
- added new "FUTURE DIRECTION" POD heading | ||
- -h flag is taken as priority in github_backup, and no longer prints | ||
erroneous warnings for missing args | ||
- we now properly respect GITHUB_TOKEN env var | ||
- fix missing newline backslash in SYNOPSIS | ||
- added new "FUTURE DIRECTION" POD heading | ||
- -h flag is taken as priority in github_backup, and no longer prints | ||
erroneous warnings for missing args | ||
- we now properly respect GITHUB_TOKEN env var | ||
|
||
1.01 2018-02-11 | ||
- added repos() and issues() | ||
- added tests | ||
- added github_backup binary | ||
- added prereq JSON | ||
- cleaned up POD tests; we skip accessor sub docs | ||
- we create repo directories under issues dir only if the repo has any | ||
issues | ||
- added repos() and issues() | ||
- added tests | ||
- added github_backup binary | ||
- added prereq JSON | ||
- cleaned up POD tests; we skip accessor sub docs | ||
- we create repo directories under issues dir only if the repo has any | ||
issues | ||
|
||
0.01 Date/time | ||
- First version, released on an unsuspecting world. | ||
- added Travis-CI and Coveralls.io integration | ||
- First version, released on an unsuspecting world. | ||
- added Travis-CI and Coveralls.io integration | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ MANIFEST.SKIP | |
README | ||
t/00-load.t | ||
t/05-new.t | ||
t/07-list.t | ||
t/10-repos.t | ||
t/15-dir.t | ||
t/20-issues.t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Github::Backup; | ||
use Test::More; | ||
|
||
if (! $ENV{AUTHOR_TESTING}){ | ||
plan skip_all => "author test only (set env var AUTHOR_TESTING=1)"; | ||
} | ||
|
||
if (! $ENV{GITHUB_TOKEN}){ | ||
plan skip_all => "This test requires your Github token to be placed into " . | ||
"the GITHUB_TOKEN environment variable\n"; | ||
} | ||
|
||
{ # base | ||
|
||
my $mod = 'Github::Backup'; | ||
|
||
my $o = $mod->new( | ||
api_user => 'stevieb9', | ||
# token => $ENV{GITHUB_TOKEN}, | ||
dir => 't/backup', | ||
); | ||
|
||
my $repos = $o->list; | ||
|
||
is scalar @$repos > 100, 1, "Number of repos ok"; | ||
|
||
|
||
my @names; | ||
for my $repo (@$repos) { | ||
my $name = $repo->{name}; | ||
push @names, $name; | ||
} | ||
|
||
use Data::Dumper; | ||
print Dumper \@names; | ||
my $result = grep /^github-backup/, @names; | ||
is $result, 1, "github-backup in the list of repos ok"; | ||
} | ||
|
||
done_testing(); |