Commit b5bd8ff2 authored by Kiyoshi Aman's avatar Kiyoshi Aman
Browse files

Chessa::Bug: fix some oversights

parent 8990bc27
......@@ -105,15 +105,15 @@ sub parse {
for my $word (@words) {
my ($project, $num, $type, $sigil, $group);
match ($word : =~) {
case (/#/) {
case (/#\d+\b/) {
$type = 'issues';
$sigil = quotemeta '#';
}
case (/!/) {
case (/!\d+\b/) {
$type = 'merge_requests';
$sigil = quotemeta '!';
}
case (/\$/) {
case (/\$\d+\b/) {
$type = 'snippets';
$sigil = quotemeta '$';
}
......@@ -126,15 +126,14 @@ sub parse {
}
}
($project, $num) = split /$sigil/, $word;
$self->{log}("Project defined? " . defined($project));
if (!defined($project)) {
if (!length($project)) {
unless ($type eq 'snippets') {
$project = $self->{conf}{default_project};
$self->{log}("Project undefined, setting to '$project'");
($group, $project) = split m!/!, $project;
if (!defined($project)) {
if (!length($project)) {
$project = $group;
$group = $self->{conf}{default_group};
$self->{log}("Group for project '$project' undefined, setting to '$group'");
......
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