Method: Gitx::Github#pull_request_body

Defined in:
lib/gitx/github.rb

#pull_request_body(branch) ⇒ Object



79
80
81
82
83
84
85
86
87
88
89
# File 'lib/gitx/github.rb', line 79

def pull_request_body(branch)
  changelog = run_git_cmd('log', "origin/#{config.base_branch}...#{branch}", '--reverse', '--no-merges', '--pretty=format:* %B')
  description = options[:description]

  description_template = []
  description_template << "#{description}\n" if description
  description_template << changelog
  description_template << "#{pull_request_template}\n" if pull_request_template

  ask_editor(description_template.join("\n"), editor: repo.config['core.editor'], footer: PULL_REQUEST_FOOTER)
end