git-routines icon indicating copy to clipboard operation
git-routines copied to clipboard

Get commit message based on current pivotal story

Open bitboxer opened this issue 10 years ago • 3 comments

At bitcrowd we construct the commit message based on the pivotal story. And I need to enter that in the time tracking and other stuff, too. Would be awesome if the system could give that to me with a simple command line call. E.g. git commit-message or something like that.

bitboxer avatar Jan 17 '15 15:01 bitboxer

Like [4711] changed everything?

So git commit-message would just call git commit -m "[…] …", adding any option like git commit-message -a would by-pass them to the original commit as git commit -m "[…] …" -a.

Alternative: At least on OS X, the commit message could be copied to the clipboard right after git start.

I’m also thinking about having something like a Gitfile, which works just as any plugin. So you could add:

after_start do
  IO.popen('pbcopy', 'w') do |f|
    f << "[#{@story.id}] #{@story.name}"
  end
end

hagenburger avatar Jan 17 '15 15:01 hagenburger

I am not sure about the Gitfile thing, but the first idea sounds good to me!

bitboxer avatar Jan 17 '15 15:01 bitboxer

:+1:

stemps avatar Feb 08 '15 17:02 stemps