From 0da288deb7eda6ea7b262bcbaf8171d883efd38e Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Fri, 4 May 2012 22:07:00 -0500 Subject: Correct grammar. --- lib/Crawl/Bot/Plugin/Commit.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Crawl/Bot/Plugin/Commit.pm b/lib/Crawl/Bot/Plugin/Commit.pm index b626aba..7eb9d04 100644 --- a/lib/Crawl/Bot/Plugin/Commit.pm +++ b/lib/Crawl/Bot/Plugin/Commit.pm @@ -86,7 +86,8 @@ sub tick { if (!$self->has_branch($branch)) { my $nrev = scalar @revs; - $self->say_all("New branch created: $branch ($nrev commits)"); + my $pl = $nrev == 1 ? "" : "s"; + $self->say_all("New branch created: $branch ($nrev commit$pl)"); } if ($self->announce_commits) { @@ -96,7 +97,8 @@ sub tick { @revs = grep { $commits{$_}->{subject} !~ /\(cherry picked from / && $commits{$_}->{body} !~ /\(cherry picked from / } @revs; $cherry_picks -= @revs; - $self->say_all("Cherry-picked $cherry_picks commits into $branch") + my $pl = $cherry_picks == 1 ? "" : "s"; + $self->say_all("Cherry-picked $cherry_picks commit$pl into $branch") if $cherry_picks > 0; for my $rev (@revs) { -- cgit v1.2.3-54-g00ecf