summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {