]> git.mjollnir.org Git - cil.git/commitdiff
cil-f8b44370: New Issue
authorAndrew Chilton <andychilton@gmail.com>
Sat, 23 Jan 2010 11:55:58 +0000 (00:55 +1300)
committerAndrew Chilton <andychilton@gmail.com>
Sat, 23 Jan 2010 12:03:39 +0000 (01:03 +1300)
issues/i_f8b44370.cil [new file with mode: 0644]
lib/CIL/Attachment.pm
lib/CIL/Command/Comment.pm
lib/CIL/Comment.pm
lib/CIL/Issue.pm
lib/CIL/VCS/Git.pm

diff --git a/issues/i_f8b44370.cil b/issues/i_f8b44370.cil
new file mode 100644 (file)
index 0000000..6367286
--- /dev/null
@@ -0,0 +1,12 @@
+Summary: When adding new issues, the Git comment is 'New Comment'
+Status: Finished
+CreatedBy: Andrew Chilton <andychilton@gmail.com>
+AssignedTo: Andrew Chilton <andychilton@gmail.com>
+Label: Milestone-v0.06
+Inserted: 2010-01-23T11:52:10
+Updated: 2010-01-23T11:56:58
+
+Instead, the message should say 'New <whatever the first entity is>'.
+
+For this, we'll need the entities to return a user readable string of what it
+is.
index 337ed1aa04e24ddfe23c20fbc4e0218bbbf79f94..ee2a73aff553667199263f352dcd92d17836546b 100644 (file)
@@ -81,6 +81,10 @@ sub prefix {
     return 'a';
 }
 
+sub type {
+    return 'Attachment';
+}
+
 sub fields {
     return \@FIELDS;
 }
index ab1e1ba7b2c74913e3527863e6e95a8a16b8fc77..8bbf1e45a373f5a191a93b46a8a1fa7cb63d8e58 100644 (file)
@@ -53,9 +53,8 @@ sub run {
 
     # if we want to commit this comment
     if ( $args->{commit} ) {
-        $cil->vcs->commit( $cil, $issue, $comment );
+        $cil->vcs->commit( $cil, $comment, $issue );
     }
-
 }
 
 1;
index 362f0940038a8aa8df742965e844291773a1bee2..5fa572b1e9cfbf2ffac9856f5398eb4a63d88368 100644 (file)
@@ -63,6 +63,10 @@ sub prefix {
     return 'c';
 }
 
+sub type {
+    return 'Comment';
+}
+
 sub fields {
     return \@FIELDS;
 }
index 75ca7b7d44e920c19d03d463521ef06153238cdd..9d23d17d1dd5dd289579f88305975e0dcfad5844 100644 (file)
@@ -82,6 +82,10 @@ sub prefix {
     return 'i';
 }
 
+sub type {
+    return 'Issue';
+}
+
 sub fields {
     return \@FIELDS;
 }
index 1aec18f67172d076fd0663ac1c4c1513c80cfe86..a6013245b09fc08795f1e0585d2e67d44f52b518 100644 (file)
@@ -128,7 +128,7 @@ sub commit {
         push @filenames, $filename;
     }
 
-    my $message = 'cil-' . $entities[0]->name . ': New Comment';
+    my $message = 'cil-' . $entities[0]->name . ': New ' . $entities[0]->type;
     return $self->git->command('commit', '-m', $message, @filenames);
 }