Description
Currently, an option expected from the user is not usually consistent with the corresponding option hash key. For instance, --enhancement-label [LABEL]
is stored as options[:enhancement_prefix]
(_label
part is stored as _prefix
internally). This produces incompatibility with the parser_file.rb
code.
That is why, there appear a situations similar to the following. One tries to use GitHub Enterprise, and provides the following entries in his .github_changelog_generator
:
github-api=https://github.mycompany.com/api/v3
github-site=https://github.mycompany.com
Then, while invoking the binary, he receives the following error:
Bad credentials.
Error: wrong GitHub token
Since parser_file.rb
placed github-api
configuration entry as :github_api
key in the hash, while :github_endpoint
was expected. Then Github.new
is being invoked as
{:per_page=>30, :oauth_token=>"eb188ed0b7ee67a7cf714f021ef2fcf48177ba75", :site=>nil}
which actually causes the error above. And that was not very straightforward to troubleshoot.
Do you think that is wise to add some additional conditionals/logics into parser_file.rb
to deal with such non-conformant options? I might be able to take this on.
/CC: @dlanileonardo