Skip to content

.github_changelog_generator config file is not consistent with the internal options hash #312

Closed
@stanislav-zaprudskiy

Description

@stanislav-zaprudskiy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions