From 43310baf5f00ed6e647b4cc9fbe17dd87e7c5f2c Mon Sep 17 00:00:00 2001 From: Andrew Chilton Date: Thu, 3 Jul 2008 23:23:47 +1200 Subject: [PATCH] Added the 'steal' command (closes #6b087805). --- README | 10 ++++++++++ bin/cil | 20 ++++++++++++++++++++ issues/c_3da3fd2f.cil | 6 ++++++ issues/i_6b087805.cil | 7 +++++-- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 issues/c_3da3fd2f.cil diff --git a/README b/README index bceb623..27404a5 100644 --- a/README +++ b/README @@ -100,4 +100,14 @@ run this to do checks regarding the whole issue list: That's it for now. As you can see, if you've played with any kind of bug/issue tracker before, 'cil' is straightforward. +Sometimes, you might add someone else repository from which you want to fetch +both code and issues. If you merge a new issue and you want to assign it to +yourself, instead of editing the issue and having to type in your name and +email, just use 'cil steal'. This will assign the issue to yourself and save it +back out: + + $ cil steal cafebabe + +Then just commit it to your VCS. + =============================================================================== diff --git a/bin/cil b/bin/cil index eb0c83a..64c5a4f 100755 --- a/bin/cil +++ b/bin/cil @@ -243,6 +243,19 @@ sub cmd_status { display_issue($cil, $issue); } +sub cmd_steal { + my ($cil, undef, $issue_name) = @_; + + # firstly, read the issue in + my $issue = load_issue_fuzzy( $cil, $issue_name ); + + # set the AssignedTo for this issue to you (because you're stealing it) + $issue->AssignedTo( user($cil) ); + $issue->save($cil); + + display_issue($cil, $issue); +} + sub cmd_add { my ($cil, undef, $issue_name) = @_; @@ -1043,6 +1056,7 @@ Commands: list [FILTERS...] show ISSUE status ISSUE NEW_STATUS + steal ISSUE edit ISSUE comment ISSUE attach ISSUE FILENAME @@ -1150,6 +1164,12 @@ completeness. ie. issue 1 has to be completed before issue 2. Shortcut so that you can set a new status on an issue without having to edit it. +=item steal ISSUE + +Shortcut to assign this issue to yourself. It reads your C<~/.cilrc> file for +your UserName and UserEmail and uses this to populate the C field +in the issue. + =item edit ISSUE Edits the issue. If it changes, set the updates time to now. diff --git a/issues/c_3da3fd2f.cil b/issues/c_3da3fd2f.cil new file mode 100644 index 0000000..323073e --- /dev/null +++ b/issues/c_3da3fd2f.cil @@ -0,0 +1,6 @@ +Issue: 6b087805 +CreatedBy: Andrew Chilton +Inserted: 2008-07-03T11:15:33 +Updated: 2008-07-03T11:16:26 + +Done. Pretty easy eh! diff --git a/issues/i_6b087805.cil b/issues/i_6b087805.cil index 30301be..186f86d 100644 --- a/issues/i_6b087805.cil +++ b/issues/i_6b087805.cil @@ -1,9 +1,12 @@ Summary: Add a 'steal' command -Status: New +Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton +Label: Milestone-v0.5 +Label: Type-Enhancement +Comment: 3da3fd2f Inserted: 2008-07-03T10:10:50 -Updated: 2008-07-03T10:12:29 +Updated: 2008-07-03T11:23:03 A 'cil steal ' command would be helpful to assign issues to yourself. This is just shorthabe for editing an issue and putting your "UserName -- 2.39.5