class Startling::Handlers::DefaultPullRequestHandler

Public Instance Methods

body() click to toggle source
# File lib/startling/handlers/default_pull_request_handler.rb, line 13
def body
  (story) ? get_story_body : Startling.pull_request_body
end
commit_message() click to toggle source
# File lib/startling/handlers/default_pull_request_handler.rb, line 17
def commit_message
  Startling.pull_request_commit_message
end
title() click to toggle source
# File lib/startling/handlers/default_pull_request_handler.rb, line 7
def title
  title = get_title
  abort "Title must be specified." if title.empty?
  title
end

Private Instance Methods

get_story_body() click to toggle source
# File lib/startling/handlers/default_pull_request_handler.rb, line 23
def get_story_body
  "#{story.pull_request_body_text}\n\n#{Startling.pull_request_body}"
end
get_title() click to toggle source
# File lib/startling/handlers/default_pull_request_handler.rb, line 27
def get_title
  if story
    story.pull_request_title
  else
    title = ask("Please input a pull request title: ")
  end
end
story() click to toggle source
# File lib/startling/handlers/default_pull_request_handler.rb, line 35
def story
  @story ||= @args.fetch(:story)
end