Refactorings
* tweak indent * rename variable name (tag_xxx -> newer_tag_xxx)
This commit is contained in:
parent
4ba7bbcc90
commit
41f43932e0
|
@ -315,24 +315,24 @@ module GitHubChangelogGenerator
|
||||||
|
|
||||||
# @param [Array] pull_requests
|
# @param [Array] pull_requests
|
||||||
# @param [Array] issues
|
# @param [Array] issues
|
||||||
# @param [String] tag_name
|
# @param [String] newer_tag_name
|
||||||
# @param [String] tag_time
|
# @param [String] newer_tag_time
|
||||||
# @param [String] older_tag_name
|
# @param [String] older_tag_name
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def create_log(pull_requests, issues, tag_name, tag_time, older_tag_name = nil)
|
def create_log(pull_requests, issues, newer_tag_name, newer_tag_time, older_tag_name = nil)
|
||||||
|
|
||||||
github_site = options[:github_site] || 'https://github.com'
|
github_site = options[:github_site] || 'https://github.com'
|
||||||
|
|
||||||
project_url = "#{github_site}/#{@options[:user]}/#{@options[:project]}"
|
project_url = "#{github_site}/#{@options[:user]}/#{@options[:project]}"
|
||||||
|
|
||||||
# Generate tag name and link
|
# Generate tag name and link
|
||||||
log = "## [#{tag_name}](#{project_url}/tree/#{tag_name})\n"
|
log = "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_name})\n"
|
||||||
|
|
||||||
# Generate compare link
|
# Generate compare link
|
||||||
log += "[Full Changelog](#{project_url}/compare/#{older_tag_name}...#{tag_name})\n" if older_tag_name
|
log += "[Full Changelog](#{project_url}/compare/#{older_tag_name}...#{newer_tag_name})\n" if older_tag_name
|
||||||
|
|
||||||
#Generate date string:
|
#Generate date string:
|
||||||
time_string = tag_time.strftime @options[:format]
|
time_string = newer_tag_time.strftime @options[:format]
|
||||||
log += "#### #{time_string}\n"
|
log += "#### #{time_string}\n"
|
||||||
|
|
||||||
if @options[:pulls]
|
if @options[:pulls]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user