Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Recommit removed patch sub
It is used by close-single-issue
  • Loading branch information
AlexDaniel committed Feb 8, 2019
1 parent 64d1f1e commit aeae577
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/Unbitrot/Utils.pm6
Expand Up @@ -34,6 +34,19 @@ sub close-single-issue($url, $token, :$state = 'closed') is export {
patch( :$url, :$token, body => { :$state } ),
}

#| Patch an issue
sub patch(:$url, :$token, :$body ) {
my $resp = await Cro::HTTP::Client.patch: $url,
headers => [
User-Agent => perl6 ecosystem unbitrot,
Authorization => token $token,
],
content-type => application/json,
body => $body,
;
return await $resp.body;
}

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

0 comments on commit aeae577

Please sign in to comment.