Commit 45ae2baa authored by Síle Ekaterin Liszka's avatar Síle Ekaterin Liszka
Browse files

Chessa::Bug::Adelie: split on sigil, not type

parent e595afb8
......@@ -103,25 +103,29 @@ sub parse {
my @uris = ();
for my $word (@words) {
my ($project, $num, $type, $group);
my ($project, $num, $type, $sigil, $group);
match ($word : =~) {
case (/#/) {
$type = 'issues';
$sigil = '#';
}
case (/!/) {
$type = 'merge_requests';
$sigil = '!'
}
case (/\$/) {
$type = 'snippets';
$sigil = qr'$';
}
case (/@[a-fA-F0-9]{7,}/) {
$type = 'commit';
$sigil = '@';
}
default {
next;
}
}
($project, $num) = split /$type/, $word;
($project, $num) = split /$sigil/, $word;
if ((!defined($project)) && ($type ne 'snippets')) {
$project = $self->{conf}{default_project};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment