Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Git Style Messages #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

onshorechet
Copy link

Like git when a command that can take a note as an argument does not
contain a note as an argument the user is prompted with their default editor to add
or edit the existing note depending on the command used.

If start is used the note is defaulted to blank if left blank no note is
set.

If stop the existing note is used to populate the editor. Changes to
this note will overwrite the existing note, not append.

If a note is included in either start or stop the command behave as normal appending the note
argument to the entry.

Like git when a command that can take a note as an agrument does note
include the note the user is prompted with their default editior to add
or edit the existing note depending on the command used.

If start is used the note is defaulted to blank if left blank no note is
set.

If stop the existing note is used to populate the editor.  Changes to
this note will overwrite the existing note, not append
@zenhob
Copy link
Owner

zenhob commented Dec 16, 2015

Thanks so much for the patch! I'm busy right now but I'll get to this soon.

@@ -14,6 +14,7 @@ task :clean do
end

require 'rake/testtask'
ENV['EDITOR'] = ''
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that this sets EDITOR globally for the Rakefile, because it's executed at the top level. This is probably not what is intended.

@@ -111,9 +112,24 @@ def start *args
if task.nil?
fail "Unknown task alias, try one of the following: ", aliases.join(', ')
end
note = args.join(' ')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good functionality but it repeats a lot of code. You should consider creating a helper method of some kind that does most of the heavy lifting, and then your repeated pattern is just a method call.

@zenhob
Copy link
Owner

zenhob commented Feb 6, 2017

This is a great idea, but this patch needs some work. I've offered a few comments, but since it's been literally years I understand if you're over it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants