# if we want to commit this issue
if ( $args->{commit} ) {
- $cil->vcs->commit( $cil, $issue );
+ $cil->vcs->commit( $cil, 'New Issue', $issue );
}
}
# if we want to commit this comment
if ( $args->{commit} ) {
- $cil->vcs->commit( $cil, $comment, $issue );
+ $cil->vcs->commit( $cil, 'New Comment', $issue, $comment );
}
}
# if we want to commit this issue
if ( $args->{commit} ) {
- $cil->vcs->commit( $cil, $issue );
+ $cil->vcs->commit( $cil, 'Issue Edited', $issue );
}
CIL::Utils->display_issue($cil, $issue);
CIL::Utils->fatal("provide a valid label to add to this issue");
}
+ my @issues;
+
# for every issue
foreach my $issue_name ( @issue_names ) {
# firstly, read the issue in
$cil->vcs->add( $cil, $issue );
}
- # if we want to commit this issue
- if ( $args->{commit} ) {
- $cil->vcs->commit( $cil, $issue );
+ push @issues, $issue;
+ }
+
+ # if we want to commit these issues
+ if ( $args->{commit} ) {
+ if ( $args->{remove} ) {
+ $cil->vcs->commit_multiple( $cil, "Removed label '$label'", @issues );
+ }
+ else {
+ $cil->vcs->commit_multiple( $cil, "Added label '$label'", @issues );
}
}
}
CIL::Utils->fatal("provide a valid status to set this issue to");
}
+ my @issues;
+
# for every issue, read it it and set the Status
foreach my $issue_name ( @issue_names ) {
# firstly, read the issue in
$cil->vcs->add( $cil, $issue );
}
- # if we want to commit this issue
- if ( $args->{commit} ) {
- $cil->vcs->commit( $cil, $issue );
- }
+ push @issues, $issue;
+ }
+
+ # if we want to commit these issues
+ if ( $args->{commit} ) {
+ $cil->vcs->commit_multiple( $cil, "Status changed to '$status'", @issues );
}
}
# if we want to commit this issue
if ( $args->{commit} ) {
- $cil->vcs->commit( $cil, $issue );
+ $cil->vcs->commit( $cil, 'Issue Stolen', $issue );
}
CIL::Utils->display_issue_full($cil, $issue);
}
sub commit {
- my ($self, $cil, @entities) = @_;
+ my ($self, $cil, $message, @entities) = @_;
+
+ my @filenames;
+ foreach my $entity ( @entities ) {
+ my $filename = $entity->filename($cil, $entity->name());
+ push @filenames, $filename;
+ }
+
+ $message = 'cil-' . $entities[0]->name . ": $message";
+ return $self->git->command('commit', '-m', $message, @filenames);
+}
+
+sub commit_multiple {
+ my ($self, $cil, $message, @entities) = @_;
my @filenames;
foreach my $entity ( @entities ) {
push @filenames, $filename;
}
- my $message = 'cil-' . $entities[0]->name . ': New ' . $entities[0]->type;
return $self->git->command('commit', '-m', $message, @filenames);
}