Merge pull request #259 from raphink/dev/release_url
Add release_url option
This commit is contained in:
commit
4aa9c61520
|
@ -76,10 +76,15 @@ module GitHubChangelogGenerator
|
|||
time_string = newer_tag_time.strftime @options[:date_format]
|
||||
|
||||
# Generate tag name and link
|
||||
if newer_tag_name.equal? @options[:unreleased_label]
|
||||
log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link})\n\n"
|
||||
if @options[:release_url]
|
||||
release_url = format(@options[:release_url], newer_tag_link)
|
||||
else
|
||||
log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link}) (#{time_string})\n"
|
||||
release_url = "#{project_url}/tree/#{newer_tag_link}"
|
||||
end
|
||||
if newer_tag_name.equal? @options[:unreleased_label]
|
||||
log += "## [#{newer_tag_name}](#{release_url})\n\n"
|
||||
else
|
||||
log += "## [#{newer_tag_name}](#{release_url}) (#{time_string})\n"
|
||||
end
|
||||
|
||||
if @options[:compare_link] && older_tag_link
|
||||
|
|
|
@ -119,6 +119,9 @@ module GitHubChangelogGenerator
|
|||
opts.on("--max-issues [NUMBER]", Integer, "Max number of issues to fetch from GitHub. Default is unlimited") do |max|
|
||||
options[:max_issues] = max
|
||||
end
|
||||
opts.on("--release-url [URL]", "The URL to point to for release links, in printf format (with the tag as variable).") do |url|
|
||||
options[:release_url] = url
|
||||
end
|
||||
opts.on("--github-site [URL]", "The Enterprise Github site on which your project is hosted.") do |last|
|
||||
options[:github_site] = last
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user