Skip to content

Commit e027a9d

Browse files
committed
Issue #0 now returns "not found" instead of "I don't know what repository to use.
1 parent 2d52099 commit e027a9d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ghurlbot.pl

+7-4
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,8 @@ ($$$$)
861861

862862
# Parse the reference and infer the full repository URL.
863863
($repository, $issue) = $self->find_repository_for_issue($channel, $text);
864-
return "Sorry, I don't know what repository to use for $text" if !$issue;
864+
return "Sorry, I don't know what repository to use for $text"
865+
if ! defined $issue;
865866

866867
# Check that it is under "https://github.com/" and then remove that part.
867868
($owner, $repo) =
@@ -987,7 +988,8 @@ ($$$$)
987988

988989
# Parse the reference and infer the full repository URL.
989990
($repository, $issue) = $self->find_repository_for_issue($channel, $text);
990-
return "Sorry, I don't know what repository to use for $text" if !$issue;
991+
return "Sorry, I don't know what repository to use for $text"
992+
if ! defined $issue;
991993

992994
# Check that it is under "https://github.com/" and then remove that part.
993995
($owner, $repo) =
@@ -1092,7 +1094,8 @@ ($$$$$)
10921094

10931095
# Parse the reference and infer the full repository URL.
10941096
($repository, $issue) = $self->find_repository_for_issue($channel, $text);
1095-
return "Sorry, I don't know what repository to use for $issue" if !$issue;
1097+
return "Sorry, I don't know what repository to use for $issue"
1098+
if ! defined $issue;
10961099

10971100
# Check that it is under "https://github.com/" and then remove that part.
10981101
($owner, $repo) =
@@ -1309,7 +1312,7 @@ ($$$$$)
13091312

13101313
if ($ref !~ /^@/ # It's a reference to an issue.
13111314
&& ($addressed || ($do_issues && $linenr > $previous + $delay))) {
1312-
if (!$issue) {
1315+
if (! defined $issue) {
13131316
$self->log("Channel $channel, cannot infer a repository for $ref");
13141317
$response .= "I don't know which repository to use for $ref\n"
13151318
if $addressed;

0 commit comments

Comments
 (0)