Warnings in V3 when calling repos_issues
szabgab opened this issue · comments
Gábor Szabó commented
use strict;
use warnings;
use 5.010;
use Data::Dumper qw(Dumper);
my $access_token = shift or die "Usage: $0 ACCESS_TOKEN\n";
use Net::GitHub;
my $gh = Net::GitHub->new(
version => 3,
access_token => $access_token,
);
my @issues = $gh->issue->repos_issues;
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Net/GitHub/V3/Issues.pm line 72.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Net/GitHub/V3/Issues.pm line 72.
Not Found at /usr/share/perl5/Net/GitHub/V3/Issues.pm line 45.
Fayland Lam commented
need set default user/repo first:
$gh->set_default_user_repo('fayland', 'perl-net-github'); # take effects for all $gh->
$issue->set_default_user_repo('fayland', 'perl-net-github'); # only take effect to $gh->issue
Gábor Szabó commented
Thanks.
Is there a way to get the issues of a repo without setting the default?
Is there a way to fetch all the issues (without iterating over all the repos?)
Fayland Lam commented
can use
my @issues = $issue->repos_issues($user, $repos, { state => 'open' } );
but you can't get all issues without repos. I don't think github has that api. (not 100% sure since I don't use github API for years)