Skip to content

Parse options file options into arrays, integers, flags, and other #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

olleolleolle
Copy link
Collaborator

The file-based .github_changelog_generator options support has been less than perfect. This PR wants to do the same options translation that happens in the OptionParser in the parser.rb file, for the file-based settings.

Fix #327

 - this proof-of-concept code duplicates OptionParser information to
   get something going
 - take care to respect the type of each option from the OptionParser
@olleolleolle olleolleolle changed the title Parse options file options Parse options file options into arrays, integers, flags, and other Mar 17, 2016
@skywinder
Copy link
Member

Very nice refactoring, @olleolleolle! 💎
Do you know, is there any way to add support of hash?
It will help to implement #316
Is this way fit our requirements, what do you think? http://stackoverflow.com/a/8614613/1698467

@olleolleolle
Copy link
Collaborator Author

To answer your question:

  • For Parser: OptionParser has built-in coercions but allows for other setting modes as well.
  • For ParserFile: we can probably do the same in #convert_value.

@olleolleolle
Copy link
Collaborator Author

I will merge this, as-is, and move to make other features possible in another PR.

olleolleolle added a commit that referenced this pull request Mar 18, 2016
Parse options file options into arrays, integers, flags, and other
@olleolleolle olleolleolle merged commit 9150cdc into github-changelog-generator:master Mar 18, 2016
@olleolleolle olleolleolle deleted the bugfix/351-exclude_tags branch March 18, 2016 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants