summary [FILTERS...]
list [FILTERS...]
show ISSUE
- status ISSUE NEW_STATUS
+ status NEW_STATUS [ISSUES...]
+ label NEW_LABEL [ISSUES...]
steal ISSUE
edit ISSUE
comment ISSUE
sub name { 'label' }
sub run {
- my ($self, $cil, undef, $issue_name, $label) = @_;
+ my ($self, $cil, undef, $label, @issue_names) = @_;
unless ( defined $label ) {
- $cil->fatal("provide a label to add to this issue");
+ CIL::Utils->fatal("provide a valid label to add to this issue");
}
- # firstly, read the issue in
- my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name );
+ # for every issue, read it it and add the label
+ foreach my $issue_name ( @issue_names ) {
+ # firstly, read the issue in
+ my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name );
- # set the status for this issue
- $issue->add_label( $label );
- $issue->save($cil);
-
- CIL::Utils->display_issue($cil, $issue);
+ # set the status for this issue
+ $issue->add_label( $label );
+ $issue->save($cil);
+ }
}
1;
sub name { 'status' }
sub run {
- my ($self, $cil, undef, $issue_name, $status) = @_;
+ my ($self, $cil, undef, $status, @issue_names) = @_;
unless ( defined $status ) {
- CIL::Utils->fatal("provide a status to set this issue to");
+ CIL::Utils->fatal("provide a valid status to set this issue to");
}
- # firstly, read the issue in
- my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name );
+ # for every issue, read it it and set the Status
+ foreach my $issue_name ( @issue_names ) {
+ # firstly, read the issue in
+ my $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name );
- # set the status for this issue
- $issue->Status( $status );
- $issue->save($cil);
-
- CIL::Utils->display_issue($cil, $issue);
+ # set the label for this issue
+ $issue->Status( $status );
+ $issue->save($cil);
+ }
}
1;
else {
$cil->vcs->create_branch( $issue->name );
}
+
+ # now that we've switched branches, load the issue in again (just in case)
+ $issue = CIL::Utils->load_issue_fuzzy( $cil, $issue_name );
+ $issue->Status( 'InProgress' );
+ $issue->save($cil);
}
1;