Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds 'is export'
  • Loading branch information
JJ committed Feb 8, 2019
2 parents f1f637f + 1482597 commit 42fe4be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Unbitrot/Utils.pm6
Expand Up @@ -4,10 +4,12 @@ unit module Unbitrot::Utils;

use Cro::HTTP::Client;

constant \url = https://api.github.com/repos/perl6/ecosystem-unbitrot/issues?per_page=60&direction=asc&state=all;
my $repo = perl6/ecosystem-unbitrot;
constant \issues-url = https://api.github.com/repos/$repo/issues?per_page=60&direction=asc&state=all;
constant \submit-url = https://api.github.com/repos/$repo/issues;

#| Returns all issues from the repo
sub get-issues(:$token, :$url = url) is export {
sub get-issues(:$token, :$url = issues-url) is export {
my @issues;
my $cur-url = url;
loop {
Expand Down Expand Up @@ -48,7 +50,7 @@ sub patch(:$url, :$token, :$body ) {
}

#| Submit a new issue
sub submit-issue(:$token, :$title, :$body, :@labels, :$url = url) is export {
sub submit-issue(:$token, :$title, :$body, :@labels, :$url = submit-url) is export {
my %body = %(:$title, :$body, :@labels,);

use Cro::HTTP::Client;
Expand Down

0 comments on commit 42fe4be

Please sign in to comment.