github_changelog_generator 1.6.2 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40402bd3227eee3064121cd9b5b7552b798bbca9
4
- data.tar.gz: 48456eb0a3eff8164d3e54b695e5dc5c67360327
3
+ metadata.gz: 48b0c1b422e51b7496fba23d8bde28317f7b5979
4
+ data.tar.gz: 1a4c6a16b1a2fc187ec00ad4af38b590336639e3
5
5
  SHA512:
6
- metadata.gz: d7669bb35cce144cdb99814cfd3c79130a3bcba6c30db20709b7c16e0adcd110f43f77f83a222de72af5f479307ec752a1e0b32662b8e5ebbe430e8d45b874ba
7
- data.tar.gz: 680e896ace56e7213a4a755be79251ad20d3132b0868d19f6674f9ccf9c08db9016653cae5299363aa9faf2157ba990780fff0efe2de979c0c07919372dde389
6
+ metadata.gz: 61dd8e4d652cddd2e70c5a9772bc5c4feb8500dbb3a368431d1f70b1e0b28373ff83fe44e265a121a2e3991cd04ee5004e812a61906494e5326a1344ce14893e
7
+ data.tar.gz: df67b14640559a3f0bba883343a6ff6208aa12159340622eca697659126571f8cb3f448242ce977833350ebb5ada6db693be441fd117e2aeb289b86be9d4d955
data/.rubocop_todo.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-06-12 11:23:12 +0300 using RuboCop version 0.31.0.
2
+ # on 2015-07-16 14:46:25 +0300 using RuboCop version 0.31.0.
3
3
  # The point is for the user to remove these configuration records
4
4
  # one by one as the offenses are removed from the code base.
5
5
  # Note that changes in the inspected code, or installation of new
@@ -7,7 +7,7 @@
7
7
 
8
8
  # Offense count: 13
9
9
  Metrics/AbcSize:
10
- Max: 71
10
+ Enabled: false
11
11
 
12
12
  # Offense count: 1
13
13
  Metrics/CyclomaticComplexity:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## [1.6.2](https://github.com/skywinder/github-changelog-generator/tree/1.6.2) (2015-07-16)
4
+
5
+ [Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.6.1...1.6.2)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - --unreleased-only broken [\#250](https://github.com/skywinder/github-changelog-generator/issues/250)
10
+
3
11
  ## [1.6.1](https://github.com/skywinder/github-changelog-generator/tree/1.6.1) (2015-06-12)
4
12
 
5
13
  [Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.6.0...1.6.1)
data/Gemfile CHANGED
@@ -1,14 +1,11 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "rake", ">=10.4.2"
4
-
5
- gem "github_api", ">=0.12.3"
6
- gem "colorize", ">=0.7.7"
3
+ gemspec
7
4
 
8
5
  group :test do
9
- gem "rspec"
10
- gem "rubocop"
11
- gem "coveralls", require: false
12
- gem "simplecov", require: false
13
- gem "codeclimate-test-reporter"
6
+ gem "rspec", "~>3.2"
7
+ gem "rubocop", "~>0.31"
8
+ gem "coveralls", "~>0.8", require: false
9
+ gem "simplecov", "~>0.10", require: false
10
+ gem "codeclimate-test-reporter", "~>0.4"
14
11
  end
data/Gemfile.lock CHANGED
@@ -1,14 +1,21 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ github_changelog_generator (1.6.2)
5
+ colorize (~> 0.7)
6
+ github_api (~> 0.12)
7
+
1
8
  GEM
2
9
  remote: https://rubygems.org/
3
10
  specs:
4
11
  addressable (2.3.8)
5
12
  ast (2.0.0)
6
- astrolabe (1.3.0)
7
- parser (>= 2.2.0.pre.3, < 3.0)
13
+ astrolabe (1.3.1)
14
+ parser (~> 2.2)
8
15
  codeclimate-test-reporter (0.4.7)
9
16
  simplecov (>= 0.7.1, < 1.0.0)
10
17
  colorize (0.7.7)
11
- coveralls (0.8.1)
18
+ coveralls (0.8.2)
12
19
  json (~> 1.8)
13
20
  rest-client (>= 1.6.8, < 2)
14
21
  simplecov (~> 0.10.0)
@@ -30,14 +37,14 @@ GEM
30
37
  multi_json (>= 1.7.5, < 2.0)
31
38
  nokogiri (~> 1.6.3)
32
39
  oauth2
33
- hashie (3.4.1)
40
+ hashie (3.4.2)
34
41
  http-cookie (1.0.2)
35
42
  domain_name (~> 0.5)
36
- json (1.8.2)
37
- jwt (1.5.0)
38
- mime-types (2.5)
43
+ json (1.8.3)
44
+ jwt (1.5.1)
45
+ mime-types (2.6.1)
39
46
  mini_portile (0.6.2)
40
- multi_json (1.11.0)
47
+ multi_json (1.11.2)
41
48
  multi_xml (0.5.5)
42
49
  multipart-post (2.0.0)
43
50
  netrc (0.10.3)
@@ -49,32 +56,32 @@ GEM
49
56
  multi_json (~> 1.3)
50
57
  multi_xml (~> 0.5)
51
58
  rack (~> 1.2)
52
- parser (2.2.2.2)
59
+ parser (2.2.2.6)
53
60
  ast (>= 1.1, < 3.0)
54
61
  powerpack (0.1.1)
55
- rack (1.6.1)
62
+ rack (1.6.4)
56
63
  rainbow (2.0.0)
57
64
  rake (10.4.2)
58
65
  rest-client (1.8.0)
59
66
  http-cookie (>= 1.0.2, < 2.0)
60
67
  mime-types (>= 1.16, < 3.0)
61
68
  netrc (~> 0.7)
62
- rspec (3.2.0)
63
- rspec-core (~> 3.2.0)
64
- rspec-expectations (~> 3.2.0)
65
- rspec-mocks (~> 3.2.0)
66
- rspec-core (3.2.3)
67
- rspec-support (~> 3.2.0)
68
- rspec-expectations (3.2.1)
69
+ rspec (3.3.0)
70
+ rspec-core (~> 3.3.0)
71
+ rspec-expectations (~> 3.3.0)
72
+ rspec-mocks (~> 3.3.0)
73
+ rspec-core (3.3.2)
74
+ rspec-support (~> 3.3.0)
75
+ rspec-expectations (3.3.1)
69
76
  diff-lcs (>= 1.2.0, < 2.0)
70
- rspec-support (~> 3.2.0)
71
- rspec-mocks (3.2.1)
77
+ rspec-support (~> 3.3.0)
78
+ rspec-mocks (3.3.2)
72
79
  diff-lcs (>= 1.2.0, < 2.0)
73
- rspec-support (~> 3.2.0)
74
- rspec-support (3.2.2)
75
- rubocop (0.31.0)
80
+ rspec-support (~> 3.3.0)
81
+ rspec-support (3.3.0)
82
+ rubocop (0.32.1)
76
83
  astrolabe (~> 1.3)
77
- parser (>= 2.2.2.1, < 3.0)
84
+ parser (>= 2.2.2.5, < 3.0)
78
85
  powerpack (~> 0.1)
79
86
  rainbow (>= 1.99.1, < 3.0)
80
87
  ruby-progressbar (~> 1.4)
@@ -84,11 +91,11 @@ GEM
84
91
  json (~> 1.8)
85
92
  simplecov-html (~> 0.10.0)
86
93
  simplecov-html (0.10.0)
87
- term-ansicolor (1.3.0)
94
+ term-ansicolor (1.3.2)
88
95
  tins (~> 1.0)
89
96
  thor (0.19.1)
90
97
  thread_safe (0.3.5)
91
- tins (1.5.1)
98
+ tins (1.5.4)
92
99
  unf (0.1.4)
93
100
  unf_ext
94
101
  unf_ext (0.0.7.1)
@@ -97,11 +104,11 @@ PLATFORMS
97
104
  ruby
98
105
 
99
106
  DEPENDENCIES
100
- codeclimate-test-reporter
101
- colorize (>= 0.7.7)
102
- coveralls
103
- github_api (>= 0.12.3)
104
- rake (>= 10.4.2)
105
- rspec
106
- rubocop
107
- simplecov
107
+ bundler (~> 1.7)
108
+ codeclimate-test-reporter (~> 0.4)
109
+ coveralls (~> 0.8)
110
+ github_changelog_generator!
111
+ rake (~> 10.0)
112
+ rspec (~> 3.2)
113
+ rubocop (~> 0.31)
114
+ simplecov (~> 0.10)
data/lib/CHANGELOG.md CHANGED
@@ -14,12 +14,17 @@
14
14
 
15
15
  **Closed issues:**
16
16
 
17
+ - Issue closed from commit from PR [\#14](https://github.com/skywinder/changelog_test/issues/14)
18
+ - Issue, closed by PR [\#12](https://github.com/skywinder/changelog_test/issues/12)
17
19
  - Issue [\#10](https://github.com/skywinder/changelog_test/issues/10)
18
-
19
20
  - Issue with some other label - Should be in closed issues [\#8](https://github.com/skywinder/changelog_test/issues/8)
20
21
 
21
- ## [0.0.4](https://github.com/skywinder/changelog_test/tree/0.0.4) (2015-05-22)
22
+ **Merged pull requests:**
23
+
24
+ - This PR closes 14 from commit [\#15](https://github.com/skywinder/changelog_test/pull/15) ([skywinder](https://github.com/skywinder))
25
+ - This PR to close \#12 from body [\#13](https://github.com/skywinder/changelog_test/pull/13) ([skywinder](https://github.com/skywinder))
22
26
 
27
+ ## [0.0.4](https://github.com/skywinder/changelog_test/tree/0.0.4) (2015-05-22)
23
28
  [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.3...0.0.4)
24
29
 
25
30
  **Closed issues:**
@@ -31,7 +36,6 @@
31
36
  - Add automatically generated change log file. [\#5](https://github.com/skywinder/changelog_test/pull/5) ([skywinder](https://github.com/skywinder))
32
37
 
33
38
  ## [v0.0.3](https://github.com/skywinder/changelog_test/tree/v0.0.3) (2015-03-04)
34
-
35
39
  [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...v0.0.3)
36
40
 
37
41
  **Merged pull requests:**
@@ -39,7 +43,6 @@
39
43
  - fix \#3. hotfix. Should appear in v0.0.3 [\#4](https://github.com/skywinder/changelog_test/pull/4) ([skywinder](https://github.com/skywinder))
40
44
 
41
45
  ## [v0.0.2](https://github.com/skywinder/changelog_test/tree/v0.0.2) (2015-03-04)
42
-
43
46
  [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.1...v0.0.2)
44
47
 
45
48
  **Merged pull requests:**
@@ -49,5 +52,4 @@
49
52
  ## [v0.0.1](https://github.com/skywinder/changelog_test/tree/v0.0.1) (2015-03-02)
50
53
 
51
54
 
52
-
53
55
  \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
@@ -56,7 +56,7 @@ module GitHubChangelogGenerator
56
56
  # @param [String] newer_tag Name of the newer tag. Could be nil for `Unreleased` section
57
57
  # @param [String] older_tag_name Older tag, used for the links. Could be nil for last tag.
58
58
  # @return [String] Ready and parsed section
59
- def create_log(pull_requests, issues, newer_tag, older_tag_name = nil)
59
+ def create_log_for_tag(pull_requests, issues, newer_tag, older_tag_name = nil)
60
60
  newer_tag_link, newer_tag_name, newer_tag_time = detect_link_tag_time(newer_tag)
61
61
 
62
62
  github_site = options[:github_site] || "https://github.com"
@@ -8,7 +8,7 @@ module GitHubChangelogGenerator
8
8
  sort_tags_by_date(@filtered_tags)
9
9
  fetch_issues_and_pr
10
10
 
11
- log = "# Change Log\n\n"
11
+ log = "#{@options[:header]}\n\n"
12
12
 
13
13
  if @options[:unreleased_only]
14
14
  log += generate_log_between_tags(filtered_tags[0], nil)
@@ -54,8 +54,9 @@ module GitHubChangelogGenerator
54
54
  if issues.any?
55
55
  issues.each do |issue|
56
56
  merge_string = get_string_for_issue(issue)
57
- log += "- #{merge_string}\n\n"
57
+ log += "- #{merge_string}\n"
58
58
  end
59
+ log += "\n"
59
60
  end
60
61
  log
61
62
  end
@@ -78,7 +79,7 @@ module GitHubChangelogGenerator
78
79
  if newer_tag_name.equal? @options[:unreleased_label]
79
80
  log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link})\n\n"
80
81
  else
81
- log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link}) (#{time_string})\n\n"
82
+ log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link}) (#{time_string})\n"
82
83
  end
83
84
 
84
85
  if @options[:compare_link] && older_tag_link
@@ -102,7 +103,7 @@ module GitHubChangelogGenerator
102
103
  return ""
103
104
  end
104
105
 
105
- create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
106
+ create_log_for_tag(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
106
107
  end
107
108
 
108
109
  # Apply all filters to issues and pull requests
@@ -59,6 +59,9 @@ module GitHubChangelogGenerator
59
59
  opts.on("--issues-label [LABEL]", "Setup custom label for closed-issues section. Default is \"**Closed issues:**\"") do |v|
60
60
  options[:issue_prefix] = v
61
61
  end
62
+ opts.on("--header-label [LABEL]", "Setup custom header label. Default is \"# Change Log\"") do |v|
63
+ options[:header] = v
64
+ end
62
65
  opts.on("--pr-label [LABEL]", "Setup custom label for pull requests section. Default is \"**Merged pull requests:**\"") do |v|
63
66
  options[:merge_prefix] = v
64
67
  end
@@ -92,7 +95,7 @@ module GitHubChangelogGenerator
92
95
  opts.on("--[no-]compare-link", "Include compare link (Full Changelog) between older version and newer version. Default is true") do |v|
93
96
  options[:compare_link] = v
94
97
  end
95
- opts.on("--include-labels x,y,z", Array, 'Only issues with the specified labels will be included in the changelog. Default is \'bug,enhancement\'') do |list|
98
+ opts.on("--include-labels x,y,z", Array, "Only issues with the specified labels will be included in the changelog.") do |list|
96
99
  options[:include_labels] = list
97
100
  end
98
101
  opts.on("--exclude-labels x,y,z", Array, 'Issues with the specified labels will be always excluded from changelog. Default is \'duplicate,question,invalid,wontfix\'') do |list|
@@ -162,6 +165,7 @@ module GitHubChangelogGenerator
162
165
  max_issues: nil,
163
166
  simple_list: false,
164
167
  verbose: true,
168
+ header: "# Change Log",
165
169
  merge_prefix: "**Merged pull requests:**",
166
170
  issue_prefix: "**Closed issues:**",
167
171
  bug_prefix: "**Fixed bugs:**",
@@ -1,3 +1,3 @@
1
1
  module GitHubChangelogGenerator
2
- VERSION = "1.6.2"
2
+ VERSION = "1.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_changelog_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev