YAML front matter
This commit is contained in:
parent
d36c67c063
commit
6f17e7c236
|
@ -8,7 +8,9 @@ module GitHubChangelogGenerator
|
||||||
sort_tags_by_date(@filtered_tags)
|
sort_tags_by_date(@filtered_tags)
|
||||||
fetch_issues_and_pr
|
fetch_issues_and_pr
|
||||||
|
|
||||||
log = "#{@options[:header]}\n\n"
|
log = ''
|
||||||
|
log += @options[:frontmatter] if @options[:frontmatter]
|
||||||
|
log += "#{@options[:header]}\n\n"
|
||||||
|
|
||||||
if @options[:unreleased_only]
|
if @options[:unreleased_only]
|
||||||
log += generate_log_between_tags(filtered_tags[0], nil)
|
log += generate_log_between_tags(filtered_tags[0], nil)
|
||||||
|
|
|
@ -68,6 +68,9 @@ module GitHubChangelogGenerator
|
||||||
opts.on("--header-label [LABEL]", "Setup custom header label. Default is \"# Change Log\"") do |v|
|
opts.on("--header-label [LABEL]", "Setup custom header label. Default is \"# Change Log\"") do |v|
|
||||||
options[:header] = v
|
options[:header] = v
|
||||||
end
|
end
|
||||||
|
opts.on("--front-matter [JSON]", "Add YAML front matter. Formatted as JSON because it's easier to add on the command line") do |v|
|
||||||
|
options[:frontmatter] = JSON.parse(v).to_yaml + "---\n"
|
||||||
|
end
|
||||||
opts.on("--pr-label [LABEL]", "Setup custom label for pull requests section. Default is \"**Merged pull requests:**\"") do |v|
|
opts.on("--pr-label [LABEL]", "Setup custom label for pull requests section. Default is \"**Merged pull requests:**\"") do |v|
|
||||||
options[:merge_prefix] = v
|
options[:merge_prefix] = v
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user