Summary: Make commit messages nicer when multiple issues are updated
-Status: New
+Status: Finished
CreatedBy: Andrew Chilton <andychilton@gmail.com>
AssignedTo: Andrew Chilton <andychilton@gmail.com>
Label: Milestone-v0.07
Inserted: 2010-01-27T23:59:52
-Updated: 2010-01-27T23:59:52
+Updated: 2010-01-29T05:40:37
When updating the status, label, depends on or precedes (and other things which
can happen to multiple issues at any one time), the commit message doesn't say
if ( $cil->UseGit ) {
# if we want to commit these issues
if ( $args->{commit} ) {
- $cil->git->commit_multiple( $cil, "Status changed to '$status'", @issues );
+ my $message = "Status changed to '$status'";
+ $cil->git->commit_multiple( $cil, $message, @issues );
}
}
}
use strict;
use warnings;
use Carp;
+use List::Util qw(reduce);
use Git;
use base qw(Class::Accessor);
push @filenames, $filename;
}
- return $self->git->command('commit', '-m', $message, @filenames);
+ my $commit_list_string = reduce { $a . $b } map { "* cil-" . $_->name . "\n" } @entities;
+
+ return $self->git->command('commit', '-m', "$message\n\n$commit_list_string", @filenames);
}
## ----------------------------------------------------------------------------