Permalink
Browse files

Only announce a commit if we got back commit details.

If we asked for a commit SHA that didn't exist, we don't get a false value back,
we get a hashref of `{ error => '...' }`.
  • Loading branch information...
1 parent 2ec8d17 commit 4b793ef1e9672b7044a20dddcb66ce35accad061 @bigpresh committed Oct 5, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Bot/BasicBot/Pluggable/Module/GitHub/EasyLinks.pm
@@ -98,7 +98,7 @@ sub said {
if ($thing eq 'commit') {
warn "Handling commit $thingnum";
my $commit = $ng->commit->show($thingnum);
- if ($commit) {
+ if ($commit && !$commit->{error}) {
my $title = ( split /\n+/, $commit->{message} )[0];
my $url = $commit->{url};

0 comments on commit 4b793ef

Please sign in to comment.