Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add delays
  • Loading branch information
AlexDaniel committed Feb 8, 2019
1 parent 188b2db commit 5704820
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/update-issues.p6
Expand Up @@ -8,6 +8,7 @@ unit sub MAIN(
$token,
IO() :$blin-data = data.json,
IO() :$template = template.md,
:$delay = 5,
);


Expand Down Expand Up @@ -38,7 +39,8 @@ for %modules.keys.sort -> $name {
if $module<status> eq OK {
if $ticket and $ticket<state> ne closed {
note Closing issue {$ticket<number>} for $name;
# close-single-issue $ticket<url>, :$token
close-single-issue $ticket<url>, :$token;
sleep $delay;
}
} else {
if not $ticket or $ticket<state> eq closed {
Expand All @@ -57,9 +59,8 @@ for %modules.keys.sort -> $name {
$body .= subst: 「PING-AUTHOR」, $ping-author;
$body .= subst: 「PREVIOUS-TICKET」, $previous-ticket;

say $body;
# submit-issue(:$token, :$title, :$body, :@labels);

submit-issue :$token, :$title, :$body, :@labels;
sleep $delay;
}
}
}

0 comments on commit 5704820

Please sign in to comment.