Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ping module author if possible
This is not 100% correct but it will do the job almos every time.
  • Loading branch information
AlexDaniel committed Feb 8, 2019
1 parent 736cac0 commit 188b2db
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions bin/update-issues.p6
Expand Up @@ -21,6 +21,17 @@ for @issues -> $issue {
.<ticket> = $issue with %modules{$issue<title>};
}

for @($module-metadata<dists>) -> $metadata {
my $module = %modules{$metadata<name>};
next unless $module;
$module<metadata> = $metadata;
my $author = Nil;
if $metadata<repo_url> ~~ /‘github.com/’(<[\w-]>+)‘/’/ {
$author = ~$0;
}
$module<author> = $author;
}

for %modules.keys.sort -> $name {
my $module = %modules{$name};
my $ticket = $module<ticket>;
Expand All @@ -36,8 +47,8 @@ for %modules.keys.sort -> $name {
my $title = $name;
my @labels;
my $body = $template-text;
my $ping-author = False ?? Ping the module author. !! ;
my $previous-ticket = $ticket ?? Preivous ticket: # ~ $ticket<number> !! ;
my $ping-author = $module<author> ?? Ping @ ~ $module<author> !! ;
my $previous-ticket = $ticket ?? Previous ticket: # ~ $ticket<number> !! ;

$body .= subst: 「MODULE」, $name;
$body .= subst: 「MODULE-URL」, https://modules.perl6.org/dist/$name;
Expand Down

0 comments on commit 188b2db

Please sign in to comment.