Commit Graph

1505 Commits

Author SHA1 Message Date
Olle Jonsson
f977cd1072
Linting: formatting code to suit RuboCop (#611) 2018-01-01 17:02:25 +01:00
Ben Holden-Crowther
77c7234cf4 Update git-generate-changelog.md (#607) 2018-01-01 16:20:54 +01:00
Ben Holden-Crowther
bf0b73b1c0 Update license date (#610) 2018-01-01 16:08:34 +01:00
Olle Jonsson
941a92e96d RuboCop linting 2017-12-29 16:17:02 +01:00
Olle Jonsson
e2ddb73373
Merge pull request #587 from eputnam/config_sections
Add option --configure-sections, --add-sections, --include-merged
2017-12-15 16:23:29 +01:00
Ben Holden-Crowther
8d0bb7d22d Capitalization and full stops (#605) 2017-12-15 16:01:04 +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
Ben Holden-Crowther
d5f82c5994 README: Improve readability of GitHub error message explanation (#601)
- As per #600 
 - [ci skip]
2017-12-13 21:02:26 +01:00
Olle Jonsson
ab6b38e315
RuboCop 0.52.0 linting (#603)
* gemspec: Make 2.2.2 the earliest-supported Ruby version

* Exclude linting which came out wrong
2017-12-13 21:00:36 +01:00
mueller-ma
9a9e57c9eb Add $ or # to indicate whether a command needs to be run as root or n… (#602)
- [ci skip]
2017-12-13 21:00:15 +01:00
Ben Holden-Crowther
ff6a9c0ff3 Minor change (#597)
Another minor grammar change. [ci skip]
2017-12-10 13:01:28 +01:00
Olle Jonsson
5137c673a7
Merge pull request #596 from benhc123/patch-2
minor cosmetic change
2017-12-09 12:26:59 +01:00
Ben Holden-Crowther
1ded80026f
minor cosmetic change
full stop and website vs Web site
2017-12-09 11:07:40 +00:00
Olle Jonsson
11d65548b8
Travis: jruby-9.1.15.0 2017-12-08 09:17:39 +01:00
Marco Ferrari
e87b267b0e Implemented a Dockerfile (#592)
* Implemented a Dockerfile. See skywinder/github-changelog-generator#591

* Set Ferrari Marco as a maintainer

* Explicitly install the latest released version
2017-11-23 14:08:50 +01:00
Olle Jonsson
72452a1315 CHANGELOG for v1.15.0-rc 2017-10-29 19:03:26 +01:00
Olle Jonsson
9377fe600a v1.15.0-rc 2017-10-29 18:59:21 +01:00
Olle Jonsson
11a7243de1
README: Markdown typo [ci skip] 2017-10-29 17:54:43 +01:00
Olle Jonsson
307994e11f Merge pull request #578 from olleolleolle/improve-abort-on-missing-info
Aborting on missing --user and --project prints all of usage
2017-10-27 09:48:35 +02:00
Olle Jonsson
4465adf943 Linting 2017-10-27 09:29:17 +02:00
Olle Jonsson
5834fd3766 Update parser.rb 2017-10-27 09:28:52 +02:00
Olle Jonsson
b486425af1 Parser: less wordy output 2017-10-27 09:28:52 +02:00
Olle Jonsson
91ac00c1d3 Abort with friendly message on no user or project 2017-10-27 09:28:52 +02:00
Olle Jonsson
4f640b74ac Aborting prints all of usage 2017-10-27 09:28:52 +02:00
Olle Jonsson
178ebfb1e7 Travis: in smoke tests, skip codeclimate 2017-10-27 09:00:08 +02:00
Olle Jonsson
eef787d74d Travis: use pre-installed Rubies
- for faster feedback
2017-10-27 08:52:23 +02:00
Olle Jonsson
faf2ddd552 Linting 2017-10-27 08:49:52 +02:00
Olle Jonsson
14c36317f1 Merge pull request #584 from olleolleolle/fix/rake-task-missing-options
Add Rake options reported missing
2017-10-26 14:45:02 +02:00
Olle Jonsson
deb902ae13 Add Rake options reported missing 2017-10-26 01:35:51 +02:00
Olle Jonsson
10e6287866 Merge pull request #576 from olleolleolle/fix/docs-for-api
Options#print_options + API docs for Options, Parser
2017-10-14 22:13:12 +02:00
Olle Jonsson
5bb4d51b96 Options#print_options: tell don't ask 2017-10-14 21:52:26 +02:00
Olle Jonsson
1fac4efe47 [docs] API docs for Options, Parser
- shorten implementation of print_options
2017-10-14 21:28:02 +02:00
Olle Jonsson
ad0d972ed9 Add option --require to load custom Ruby code (#574) 2017-10-14 21:00:56 +02:00
Olle Jonsson
79518161b8 [docs] Contributing file (#575)
- [ci skip]
2017-10-14 15:33:34 +02:00
Olle Jonsson
db0e848208 CHANGELOG for v1.15.0.pre.beta 2017-10-13 21:14:22 +02:00
Olle Jonsson
d16bf4cfaa v1.15.0-beta 2017-10-13 21:08:09 +02:00
Ewoud Kohl van Wijngaarden
fe7c585ed1 Fix regression w/ enhancements in issues_to_log (#573)
Introduced in 21ec2db39b.
2017-10-13 06:08:59 +02:00
Olle Jonsson
3f8fb60af3 OctoFetcher: Use defaults for request_options (#571)
* OctoFetcher: rely on default args

  - in iterate_pages

* OctoFetcher: extract options method
2017-10-10 23:48:00 +02:00
Olle Jonsson
23b341f715 OctoFetcher: extract methods (#570)
* OctoFetcher: extract methods

* OctoFetcher: extract github_options smethod

* OctoFetcher: Document exception, name parameters

  - more communicative names

* OctoFetcher#fetch_github_token: simplify

  - using ActiveSupport

* OctoFetcher#init_cache: fewer statements

* OctoFetcher: inline calls, name parameters

* OctoFetcher: name parameters, inline local
2017-10-10 23:05:10 +02:00
Olle Jonsson
630b8cee88 OctoFetcher: extract method fail_with_message (#569) 2017-10-10 21:42:29 +02:00
Olle Jonsson
74fdc2026a OctoFetcher: drop unused number_of_pages feature (#568) 2017-10-10 21:22:17 +02:00
Tim Meusel
21ec2db39b Add breaking-changes section to changelog (#530)
* add breaking-changes section to changelog

* Clean up parse_by_sections

* Thank you bastelfreak and ekohl!
2017-10-10 20:27:23 +02:00
Olle Jonsson
d1e09f6964 Travis: Do not test on jruby-head (#567) 2017-10-10 20:11:36 +02:00
Olle Jonsson
b36d85eb53 Drop Project-and-Username-finding code (#451)
* Remove Project-and-Username finding code and usages

* Remove "github_remote" option, now unused

* Update README: Usage has changed
2017-10-10 19:53:21 +02:00
Ben Holden-Crowther
1658b41dff Update license date to a range (#553)
* Update license date to a range containing 2017
2017-10-05 23:38:23 +02:00
Florian Thomas
64f4cd07c9 filter tags correctly when since_tag is set to most recent tag (#566)
* filter tags correctly when `since_tag` is set to most recent tag
Before this fix [`filtered_tags`](https://github.com/skywinder/github-changelog-generator/blob/master/lib/github_changelog_generator/generator/generator_generation.rb#L132)
was empty which caused a fallback to the last tag in the sorted_tags array (which is the oldest tag).
There for no issues and PRs were filtered in that case.

fixes #555
fixes #304
2017-10-05 23:15:06 +02:00
Olle Jonsson
7cbe41555a Drop unused Rake task (#564) 2017-10-04 09:06:49 +02:00
Olle Jonsson
dd956b7b95 CHANGELOG for v1.15.0.pre.alpha 2017-10-01 15:47:16 +02:00
Olle Jonsson
07a665d800 v1.15.0-alpha 2017-10-01 15:28:09 +02:00