lib/pivotal-github/story_commit.rb in pivotal-github-0.8.1 vs lib/pivotal-github/story_commit.rb in pivotal-github-0.9.0
- old
+ new
@@ -22,30 +22,10 @@
puts opts.to_s; exit 0
end
end
end
- # Returns the message for the story id(s) and action (if any).
- def message
- if finish?
- label = "Finishes #{message_ids}"
- elsif deliver?
- label = "Delivers #{message_ids}"
- else
- label = message_ids
- end
- "[#{label}]"
- end
-
- # Returns the story ids formatted for story commits.
- # For single-id stories, this is just the number preceded by '#', as in
- # '#62831853'. For multiple-id stories, each story id is precede by '#', as in
- # '#62831853 #31415926'
- def message_ids
- story_ids.map { |id| "##{id}" }.join(' ')
- end
-
# Returns a command appropriate for executing at the command line.
# We take care to insert the story number and, if necessary, an indication
# that the commit finishes the story.
def cmd
c = ['git commit']
@@ -59,17 +39,9 @@
def run!
system cmd
end
private
-
- def finish?
- options.finish
- end
-
- def deliver?
- options.deliver
- end
def message?
!options.message.nil?
end
\ No newline at end of file