Skip to content

Commit

Permalink
argv_parser: Ensure that YAML is loaded before use (#963)
Browse files Browse the repository at this point in the history
Fixes #962
  • Loading branch information
olleolleolle committed May 14, 2021
1 parent 9e9ee60 commit e400e25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/github_changelog_generator/argv_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit e400e25

Please sign in to comment.