diff --git a/lib/github_changelog_generator/argv_parser.rb b/lib/github_changelog_generator/argv_parser.rb index 168210d0..e62bae72 100755 --- a/lib/github_changelog_generator/argv_parser.rb +++ b/lib/github_changelog_generator/argv_parser.rb @@ -73,6 +73,7 @@ def parser options[:add_sections] = v 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| + require "yaml" options[:frontmatter] = "#{JSON.parse(v).to_yaml}---\n" end opts.on("--pr-label LABEL", "Set up custom label for pull requests section. Default is \"**Merged pull requests:**\".") do |v|