github_changelog_generator 1.15.2 → 1.16.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -6
  3. data/Rakefile +1 -1
  4. data/lib/github_changelog_generator/argv_parser.rb +225 -0
  5. data/lib/github_changelog_generator/generator/entry.rb +10 -10
  6. data/lib/github_changelog_generator/generator/generator.rb +41 -19
  7. data/lib/github_changelog_generator/generator/generator_fetcher.rb +5 -9
  8. data/lib/github_changelog_generator/generator/generator_processor.rb +23 -20
  9. data/lib/github_changelog_generator/generator/generator_tags.rb +15 -9
  10. data/lib/github_changelog_generator/generator/section.rb +27 -7
  11. data/lib/github_changelog_generator/helper.rb +1 -1
  12. data/lib/github_changelog_generator/octo_fetcher.rb +196 -149
  13. data/lib/github_changelog_generator/options.rb +4 -0
  14. data/lib/github_changelog_generator/parser.rb +70 -248
  15. data/lib/github_changelog_generator/parser_file.rb +29 -14
  16. data/lib/github_changelog_generator/reader.rb +4 -2
  17. data/lib/github_changelog_generator/ssl_certs/cacert.pem +851 -1756
  18. data/lib/github_changelog_generator/task.rb +3 -2
  19. data/lib/github_changelog_generator/version.rb +1 -1
  20. data/man/git-generate-changelog.1 +46 -34
  21. data/man/git-generate-changelog.1.html +39 -31
  22. data/man/git-generate-changelog.html +19 -19
  23. data/man/git-generate-changelog.md +39 -31
  24. data/spec/files/config_example +5 -0
  25. data/spec/spec_helper.rb +1 -1
  26. data/spec/unit/generator/entry_spec.rb +37 -31
  27. data/spec/unit/generator/generator_processor_spec.rb +99 -44
  28. data/spec/unit/generator/generator_spec.rb +47 -0
  29. data/spec/unit/generator/generator_tags_spec.rb +46 -3
  30. data/spec/unit/generator/section_spec.rb +34 -0
  31. data/spec/unit/octo_fetcher_spec.rb +45 -5
  32. data/spec/unit/parser_spec.rb +50 -0
  33. data/spec/unit/reader_spec.rb +9 -0
  34. metadata +44 -23
@@ -15,11 +15,11 @@ module GitHubChangelogGenerator
15
15
  pulls filter_issues_by_milestone author
16
16
  unreleased_only unreleased unreleased_label
17
17
  compare_link include_labels exclude_labels
18
- bug_labels enhancement_labels
18
+ bug_labels enhancement_labels include_tags_regex
19
19
  between_tags exclude_tags exclude_tags_regex since_tag max_issues
20
20
  github_site github_endpoint simple_list
21
21
  future_release release_branch verbose release_url
22
- base configure_sections add_sections]
22
+ base configure_sections add_sections http_cache]
23
23
 
24
24
  OPTIONS.each do |o|
25
25
  attr_accessor o.to_sym
@@ -31,6 +31,7 @@ module GitHubChangelogGenerator
31
31
  #
32
32
  # GitHubChangelogGenerator::RakeTask.new
33
33
  def initialize(*args, &task_block)
34
+ super()
34
35
  @name = args.shift || :changelog
35
36
 
36
37
  define(args, &task_block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitHubChangelogGenerator
4
- VERSION = "1.15.2"
4
+ VERSION = "1.16.4"
5
5
  end
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "GIT\-GENERATE\-CHANGELOG" "1" "May 2018" "" ""
4
+ .TH "GIT\-GENERATE\-CHANGELOG" "1" "May 2020" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBgit\-generate\-changelog\fR \- Generate changelog from GitHub
@@ -13,115 +13,115 @@
13
13
  Automatically generate changelog from your tags, issues, labels and pull requests on GitHub\.
14
14
  .
15
15
  .SH "OPTIONS"
16
- \-u, \-\-user [USER]
16
+ \-u, \-\-user USER
17
17
  .
18
18
  .P
19
19
  Username of the owner of target GitHub repo\.
20
20
  .
21
21
  .P
22
- \-p, \-\-project [PROJECT]
22
+ \-p, \-\-project PROJECT
23
23
  .
24
24
  .P
25
25
  Name of project on GitHub\.
26
26
  .
27
27
  .P
28
- \-t, \-\-token [TOKEN]
28
+ \-t, \-\-token TOKEN
29
29
  .
30
30
  .P
31
31
  To make more than 50 requests per hour your GitHub token is required\. You can generate it at: https://github\.com/settings/tokens/new
32
32
  .
33
33
  .P
34
- \-f, \-\-date\-format [FORMAT]
34
+ \-f, \-\-date\-format FORMAT
35
35
  .
36
36
  .P
37
37
  Date format\. Default is %Y\-%m\-%d\.
38
38
  .
39
39
  .P
40
- \-o, \-\-output [NAME]
40
+ \-o, \-\-output NAME
41
41
  .
42
42
  .P
43
43
  Output file\. To print to STDOUT instead, use blank as path\. Default is CHANGELOG\.md\.
44
44
  .
45
45
  .P
46
- \-b, \-\-base [NAME]
46
+ \-b, \-\-base NAME
47
47
  .
48
48
  .P
49
- Optional base file to append generated changes to\.
49
+ Optional base file to append generated changes to\. Default is HISTORY\.md\.
50
50
  .
51
51
  .P
52
- \-\-summary\-label [LABEL]
52
+ \-\-summary\-label LABEL
53
53
  .
54
54
  .P
55
55
  Set up custom label for the release summary section\. Default is ""\.
56
56
  .
57
57
  .P
58
- \-\-breaking\-label [LABEL]
58
+ \-\-breaking\-label LABEL
59
59
  .
60
60
  .P
61
61
  Set up custom label for breaking changes section\. Default is "\fBBreaking changes:\fR"\.
62
62
  .
63
63
  .P
64
- \-\-enhancement\-label [LABEL]
64
+ \-\-enhancement\-label LABEL
65
65
  .
66
66
  .P
67
67
  Set up custom label for enhancements section\. Default is "\fBImplemented enhancements:\fR"\.
68
68
  .
69
69
  .P
70
- \-\-bugs\-label [LABEL]
70
+ \-\-bugs\-label LABEL
71
71
  .
72
72
  .P
73
73
  Set up custom label for bug\-fixes section\. Default is "\fBFixed bugs:\fR"\.
74
74
  .
75
75
  .P
76
- \-\-deprecated\-label [LABEL]
76
+ \-\-deprecated\-label LABEL
77
77
  .
78
78
  .P
79
79
  Set up custom label for deprecated section\. Default is "\fBDeprecated:\fR"\.
80
80
  .
81
81
  .P
82
- \-\-removed\-label [LABEL]
82
+ \-\-removed\-label LABEL
83
83
  .
84
84
  .P
85
85
  Set up custom label for removed section\. Default is "\fBRemoved:\fR"\.
86
86
  .
87
87
  .P
88
- \-\-security\-label [LABEL]
88
+ \-\-security\-label LABEL
89
89
  .
90
90
  .P
91
91
  Set up custom label for security section\. Default is "\fBSecurity:\fR"\.
92
92
  .
93
93
  .P
94
- \-\-issues\-label [LABEL]
94
+ \-\-issues\-label LABEL
95
95
  .
96
96
  .P
97
97
  Set up custom label for closed\-issues section\. Default is "\fBClosed issues:\fR"\.
98
98
  .
99
99
  .P
100
- \-\-header\-label [LABEL]
100
+ \-\-header\-label LABEL
101
101
  .
102
102
  .P
103
103
  Set up custom header label\. Default is "# Changelog"\.
104
104
  .
105
105
  .P
106
- \-\-configure\-sections [HASH, STRING]
106
+ \-\-configure\-sections HASH, STRING
107
107
  .
108
108
  .P
109
109
  Define your own set of sections which overrides all default sections\.
110
110
  .
111
111
  .P
112
- \-\-add\-sections [HASH, STRING]
112
+ \-\-add\-sections HASH, STRING
113
113
  .
114
114
  .P
115
115
  Add new sections but keep the default sections\.
116
116
  .
117
117
  .P
118
- \-\-front\-matter [JSON]
118
+ \-\-front\-matter JSON
119
119
  .
120
120
  .P
121
121
  Add YAML front matter\. Formatted as JSON because it\'s easier to add on the command line\.
122
122
  .
123
123
  .P
124
- \-\-pr\-label [LABEL]
124
+ \-\-pr\-label LABEL
125
125
  .
126
126
  .P
127
127
  Set up custom label for pull requests section\. Default is "\fBMerged pull requests:\fR"\.
@@ -157,6 +157,12 @@ Include pull\-requests in changelog\. Default is true\.
157
157
  Use milestone to detect when issue was resolved\. Default is true\.
158
158
  .
159
159
  .P
160
+ \-\-[no\-]issues\-of\-open\-milestones
161
+ .
162
+ .P
163
+ Include issues of open milestones\. Default is true\.
164
+ .
165
+ .P
160
166
  \-\-[no\-]author
161
167
  .
162
168
  .P
@@ -181,7 +187,7 @@ Generate log from unreleased closed issues only\.
181
187
  Add to log unreleased closed issues\. Default is true\.
182
188
  .
183
189
  .P
184
- \-\-unreleased\-label [label]
190
+ \-\-unreleased\-label LABEL
185
191
  .
186
192
  .P
187
193
  Set up custom label for unreleased closed issues section\. Default is "\fBUnreleased:\fR"\.
@@ -259,7 +265,7 @@ The specified labels will be shown in brackets next to each matching issue\. Use
259
265
  Changelog will exclude specified tags\.
260
266
  .
261
267
  .P
262
- \-\-exclude\-tags\-regex [REGEX]
268
+ \-\-exclude\-tags\-regex REGEX
263
269
  .
264
270
  .P
265
271
  Apply a regular expression on tag names so that they can be excluded, for example: \-\-exclude\-tags\-regex "\.*+\ed{1,}"\.
@@ -277,25 +283,31 @@ Changelog will start after specified tag\.
277
283
  Changelog will end before specified tag\.
278
284
  .
279
285
  .P
280
- \-\-max\-issues [NUMBER]
286
+ \-\-since\-commit x
287
+ .
288
+ .P
289
+ Fetch only commits after this time\. eg\. "2017\-01\-01 10:00:00"
290
+ .
291
+ .P
292
+ \-\-max\-issues NUMBER
281
293
  .
282
294
  .P
283
295
  Maximum number of issues to fetch from GitHub\. Default is unlimited\.
284
296
  .
285
297
  .P
286
- \-\-release\-url [URL]
298
+ \-\-release\-url URL
287
299
  .
288
300
  .P
289
301
  The URL to point to for release links, in printf format (with the tag as variable)\.
290
302
  .
291
303
  .P
292
- \-\-github\-site [URL]
304
+ \-\-github\-site URL
293
305
  .
294
306
  .P
295
307
  The Enterprise GitHub site where your project is hosted\.
296
308
  .
297
309
  .P
298
- \-\-github\-api [URL]
310
+ \-\-github\-api URL
299
311
  .
300
312
  .P
301
313
  The enterprise endpoint to use for your GitHub API\.
@@ -307,13 +319,13 @@ The enterprise endpoint to use for your GitHub API\.
307
319
  Create a simple list from issues and pull requests\. Default is false\.
308
320
  .
309
321
  .P
310
- \-\-future\-release [RELEASE\-VERSION]
322
+ \-\-future\-release RELEASE\-VERSION
311
323
  .
312
324
  .P
313
325
  Put the unreleased changes in the specified release number\.
314
326
  .
315
327
  .P
316
- \-\-release\-branch [RELEASE\-BRANCH]
328
+ \-\-release\-branch RELEASE\-BRANCH
317
329
  .
318
330
  .P
319
331
  Limit pull requests to the release branch, such as master or release\.
@@ -325,19 +337,19 @@ Limit pull requests to the release branch, such as master or release\.
325
337
  Use HTTP Cache to cache GitHub API requests (useful for large repos)\. Default is true\.
326
338
  .
327
339
  .P
328
- \-\-[no\-]cache\-file [CACHE\-FILE]
340
+ \-\-[no\-]cache\-file CACHE\-FILE
329
341
  .
330
342
  .P
331
343
  Filename to use for cache\. Default is github\-changelog\-http\-cache in a temporary directory\.
332
344
  .
333
345
  .P
334
- \-\-cache\-log [CACHE\-LOG]
346
+ \-\-cache\-log CACHE\-LOG
335
347
  .
336
348
  .P
337
349
  Filename to use for cache log\. Default is github\-changelog\-logger\.log in a temporary directory\.
338
350
  .
339
351
  .P
340
- \-\-ssl\-ca\-file [PATH]
352
+ \-\-ssl\-ca\-file PATH
341
353
  .
342
354
  .P
343
355
  Path to cacert\.pem file\. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert\.pem\. Respects SSL_CA_PATH\.
@@ -375,7 +387,7 @@ GitHub pull requests that have been merged whose merge commit SHA has been modif
375
387
  Written by Petr Korolev sky4winder@gmail\.com
376
388
  .
377
389
  .SH "REPORTING BUGS"
378
- <\fIhttps://github\.com/github-changelog-generator/github\-changelog\-generator/issues\fR>
390
+ <\fIhttps://github\.com/github\-changelog\-generator/github\-changelog\-generator/issues\fR>
379
391
  .
380
392
  .SH "SEE ALSO"
381
- <\fIhttps://github\.com/github-changelog-generator/github\-changelog\-generator/\fR>
393
+ <\fIhttps://github\.com/github\-changelog\-generator/github\-changelog\-generator/\fR>
@@ -85,79 +85,79 @@
85
85
 
86
86
  <h2 id="OPTIONS">OPTIONS</h2>
87
87
 
88
- <p> -u, --user [USER]</p>
88
+ <p> -u, --user USER</p>
89
89
 
90
90
  <p> Username of the owner of target GitHub repo.</p>
91
91
 
92
- <p> -p, --project [PROJECT]</p>
92
+ <p> -p, --project PROJECT</p>
93
93
 
94
94
  <p> Name of project on GitHub.</p>
95
95
 
96
- <p> -t, --token [TOKEN]</p>
96
+ <p> -t, --token TOKEN</p>
97
97
 
98
98
  <p> To make more than 50 requests per hour your GitHub token is required. You can generate it at: https://github.com/settings/tokens/new</p>
99
99
 
100
- <p> -f, --date-format [FORMAT]</p>
100
+ <p> -f, --date-format FORMAT</p>
101
101
 
102
102
  <p> Date format. Default is %Y-%m-%d.</p>
103
103
 
104
- <p> -o, --output [NAME]</p>
104
+ <p> -o, --output NAME</p>
105
105
 
106
106
  <p> Output file. To print to STDOUT instead, use blank as path. Default is CHANGELOG.md.</p>
107
107
 
108
- <p> -b, --base [NAME]</p>
108
+ <p> -b, --base NAME</p>
109
109
 
110
110
  <p> Optional base file to append generated changes to.</p>
111
111
 
112
- <p> --summary-label [LABEL]</p>
112
+ <p> --summary-label LABEL</p>
113
113
 
114
114
  <p> Set up custom label for the release summary section. Default is "".</p>
115
115
 
116
- <p> --breaking-label [LABEL]</p>
116
+ <p> --breaking-label LABEL</p>
117
117
 
118
118
  <p> Set up custom label for breaking changes section. Default is "<strong>Breaking changes:</strong>".</p>
119
119
 
120
- <p> --enhancement-label [LABEL]</p>
120
+ <p> --enhancement-label LABEL</p>
121
121
 
122
122
  <p> Set up custom label for enhancements section. Default is "<strong>Implemented enhancements:</strong>".</p>
123
123
 
124
- <p> --bugs-label [LABEL]</p>
124
+ <p> --bugs-label LABEL</p>
125
125
 
126
126
  <p> Set up custom label for bug-fixes section. Default is "<strong>Fixed bugs:</strong>".</p>
127
127
 
128
- <p> --deprecated-label [LABEL]</p>
128
+ <p> --deprecated-label LABEL</p>
129
129
 
130
130
  <p> Set up custom label for deprecated section. Default is "<strong>Deprecated:</strong>".</p>
131
131
 
132
- <p> --removed-label [LABEL]</p>
132
+ <p> --removed-label LABEL</p>
133
133
 
134
134
  <p> Set up custom label for removed section. Default is "<strong>Removed:</strong>".</p>
135
135
 
136
- <p> --security-label [LABEL]</p>
136
+ <p> --security-label LABEL</p>
137
137
 
138
138
  <p> Set up custom label for security section. Default is "<strong>Security:</strong>".</p>
139
139
 
140
- <p> --issues-label [LABEL]</p>
140
+ <p> --issues-label LABEL</p>
141
141
 
142
142
  <p> Set up custom label for closed-issues section. Default is "<strong>Closed issues:</strong>".</p>
143
143
 
144
- <p> --header-label [LABEL]</p>
144
+ <p> --header-label LABEL</p>
145
145
 
146
146
  <p> Set up custom header label. Default is "# Changelog".</p>
147
147
 
148
- <p> --configure-sections [HASH, STRING]</p>
148
+ <p> --configure-sections HASH, STRING</p>
149
149
 
150
150
  <p> Define your own set of sections which overrides all default sections.</p>
151
151
 
152
- <p> --add-sections [HASH, STRING]</p>
152
+ <p> --add-sections HASH, STRING</p>
153
153
 
154
154
  <p> Add new sections but keep the default sections.</p>
155
155
 
156
- <p> --front-matter [JSON]</p>
156
+ <p> --front-matter JSON</p>
157
157
 
158
158
  <p> Add YAML front matter. Formatted as JSON because it's easier to add on the command line.</p>
159
159
 
160
- <p> --pr-label [LABEL]</p>
160
+ <p> --pr-label LABEL</p>
161
161
 
162
162
  <p> Set up custom label for pull requests section. Default is "<strong>Merged pull requests:</strong>".</p>
163
163
 
@@ -181,6 +181,10 @@
181
181
 
182
182
  <p> Use milestone to detect when issue was resolved. Default is true.</p>
183
183
 
184
+ <p> --[no-]issues-of-open-milestones</p>
185
+
186
+ <p> Include issues of open milestones. Default is true.</p>
187
+
184
188
  <p> --[no-]author</p>
185
189
 
186
190
  <p> Add author of pull request at the end. Default is true.</p>
@@ -197,7 +201,7 @@
197
201
 
198
202
  <p> Add to log unreleased closed issues. Default is true.</p>
199
203
 
200
- <p> --unreleased-label [label]</p>
204
+ <p> --unreleased-label LABEL</p>
201
205
 
202
206
  <p> Set up custom label for unreleased closed issues section. Default is "<strong>Unreleased:</strong>".</p>
203
207
 
@@ -249,7 +253,7 @@
249
253
 
250
254
  <p> Changelog will exclude specified tags.</p>
251
255
 
252
- <p> --exclude-tags-regex [REGEX]</p>
256
+ <p> --exclude-tags-regex REGEX</p>
253
257
 
254
258
  <p> Apply a regular expression on tag names so that they can be excluded, for example: --exclude-tags-regex ".*+\d{1,}".</p>
255
259
 
@@ -261,19 +265,23 @@
261
265
 
262
266
  <p> Changelog will end before specified tag.</p>
263
267
 
264
- <p> --max-issues [NUMBER]</p>
268
+ <p> --since-commit x</p>
269
+
270
+ <p> Fetch only commits after this time. eg. "2017-01-01 10:00:00"</p>
271
+
272
+ <p> --max-issues NUMBER</p>
265
273
 
266
274
  <p> Maximum number of issues to fetch from GitHub. Default is unlimited.</p>
267
275
 
268
- <p> --release-url [URL]</p>
276
+ <p> --release-url URL</p>
269
277
 
270
278
  <p> The URL to point to for release links, in printf format (with the tag as variable).</p>
271
279
 
272
- <p> --github-site [URL]</p>
280
+ <p> --github-site URL</p>
273
281
 
274
282
  <p> The Enterprise GitHub site where your project is hosted.</p>
275
283
 
276
- <p> --github-api [URL]</p>
284
+ <p> --github-api URL</p>
277
285
 
278
286
  <p> The enterprise endpoint to use for your GitHub API.</p>
279
287
 
@@ -281,11 +289,11 @@
281
289
 
282
290
  <p> Create a simple list from issues and pull requests. Default is false.</p>
283
291
 
284
- <p> --future-release [RELEASE-VERSION]</p>
292
+ <p> --future-release RELEASE-VERSION</p>
285
293
 
286
294
  <p> Put the unreleased changes in the specified release number.</p>
287
295
 
288
- <p> --release-branch [RELEASE-BRANCH]</p>
296
+ <p> --release-branch RELEASE-BRANCH</p>
289
297
 
290
298
  <p> Limit pull requests to the release branch, such as master or release.</p>
291
299
 
@@ -293,15 +301,15 @@
293
301
 
294
302
  <p> Use HTTP Cache to cache GitHub API requests (useful for large repos). Default is true.</p>
295
303
 
296
- <p> --[no-]cache-file [CACHE-FILE]</p>
304
+ <p> --[no-]cache-file CACHE-FILE</p>
297
305
 
298
306
  <p> Filename to use for cache. Default is github-changelog-http-cache in a temporary directory.</p>
299
307
 
300
- <p> --cache-log [CACHE-LOG]</p>
308
+ <p> --cache-log CACHE-LOG</p>
301
309
 
302
310
  <p> Filename to use for cache log. Default is github-changelog-logger.log in a temporary directory.</p>
303
311
 
304
- <p> --ssl-ca-file [PATH]</p>
312
+ <p> --ssl-ca-file PATH</p>
305
313
 
306
314
  <p> Path to cacert.pem file. Default is a bundled lib/github_changelog_generator/ssl_certs/cacert.pem. Respects SSL_CA_PATH.</p>
307
315
 
@@ -342,7 +350,7 @@
342
350
 
343
351
  <ol class='man-decor man-foot man foot'>
344
352
  <li class='tl'></li>
345
- <li class='tc'>May 2018</li>
353
+ <li class='tc'>May 2020</li>
346
354
  <li class='tr'>git-generate-changelog(1)</li>
347
355
  </ol>
348
356