Commit Graph

10 Commits

Author SHA1 Message Date
Ben Holden-Crowther
77c7234cf4 Update git-generate-changelog.md (#607) 2018-01-01 16:20:54 +01:00
Eric Putnam
587557e1ac
Refactor generation code and allow custom sections
There's a lot in this PR.
- Added a Section class to more easily make the other changes and
  hopefully add flexibility for the future
- Added an option called `configure_sections` that allows you create
  your own custom sections. It blows away all other sections and uses
only the ones you give it.
- Added an option called `add_sections` that allows you to add_sections
  to the default section set
- Added an option called `include_merged` that can be used when
  configure_sections is defined. Configure sections blows away any and
all default sections so to get this one back, you have to set this
option.
- Added tests for this stuff

@HAIL9000 was a co-author. Because of a little git snafu, I accidentally
squashed all of our work into one so it looks like it was just me.

---

Refactor details:

Before this change, the code in generator.rb and generator_generation.rb was conflated and
method call flow went back and forth between the two files seemingly
randomly. They also both defined the exact same class, which is
un-ruby-ish. I tried to separate methods used for the whole changelog
generation from methods used for specific parts of the changelog and
move them into specific classes.

I reasoned that a changelog is a series of "entries" of all tagged
releases plus an extra entry for the unreleased entry. Each entry is
comprised of a header and a series of "sections" for that entry. Each
section is comprized of a list of issues and/or pull requests for that
entry. So the log contains entries, entries contain sections, and
sections contain issues & prs. I have structured the classes around this idea.

- lib/github_changelog_generator/generator/generator.rb is for code
related to generating the entire changelog.
- lib/github_changelog_generator/generator/entry.rb is for code related
to generating entries.
- lib/github_changelog_generator/generator/section.rb is for code
relating to geneating entry sections.

Issues and PRs are already special objects, so it doesn't make sense to
break those out into their own class.
2017-12-14 16:13:41 -08:00
Saugat Acharya
d9cf6ffd94 Make 'change log' a single word (#579) 2017-12-13 22:06:00 +01:00
Olle Jonsson
ad0d972ed9 Add option --require to load custom Ruby code (#574) 2017-10-14 21:00:56 +02:00
Lucas Huang
e9ee9556ce remove --between_tags option (#501) 2017-05-25 00:29:31 +02:00
Olle Jonsson
26b124a67c bundled cacert.pem with --ssl-ca-file PATH option (#480)
* Add a bundled cacert.pem from curl's website
* Using the --ssl-ca-file PATH option overrides ENV var SSL_CA_PATH
* Having none of those allow you to use the default, the bundled cacert.pem
* Octokit's SSL config uses this new setting
* Rake task to update_ssl_ca_file
* Rubocop target 2.2
2017-05-24 23:43:31 +02:00
Olle Jonsson
8d74965019 Create temporary cache files in Dir.tmpdir (#459)
* OctoFetcher: http_cache options conditional
* Locate cache directory using Dir.tmpdir
* Cache files options can not have defaults
2017-02-08 18:14:02 +01:00
Olle Jonsson
1dc33e3005 Option --unreleased-label explained 2016-11-04 22:53:49 +01:00
Olle Jonsson
ed3e771902 man page: Add undescribed options 2016-11-01 21:39:50 +01:00
Petr Korolev
cea26c2fdd add md man file 2016-02-17 09:13:14 -02:00