Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings in V3 when calling repos_issues #106

Open
szabgab opened this issue Mar 28, 2021 · 3 comments
Open

Warnings in V3 when calling repos_issues #106

szabgab opened this issue Mar 28, 2021 · 3 comments

Comments

@szabgab
Copy link

szabgab commented Mar 28, 2021

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
Copy link
Owner

fayland commented Mar 28, 2021

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

@szabgab
Copy link
Author

szabgab commented Mar 28, 2021

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
Copy link
Owner

fayland commented Mar 28, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants