summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-05-04 22:07:00 -0500
committerNeil Moore <neil@s-z.org>2012-05-04 22:07:00 -0500
commit0da288deb7eda6ea7b262bcbaf8171d883efd38e (patch)
tree56bbd0b2fdf75c3923e5caa9a2f4a8723f3d53b8
parent7f3d16a70e32379d9e016b1e7c01f4a59c3a12ee (diff)
downloadcrawlbot-0da288deb7eda6ea7b262bcbaf8171d883efd38e.tar.gz
crawlbot-0da288deb7eda6ea7b262bcbaf8171d883efd38e.zip
Correct grammar.
-rw-r--r--lib/Crawl/Bot/Plugin/Commit.pm6
1 files changed, 4 insertions, 2 deletions
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) {