github_changelog_generator 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59c84fc6b47537cdca06c26c80e84ba2173eb941
4
- data.tar.gz: 23353066809d7171627bce5d6ae88d004f685383
3
+ metadata.gz: 8b24a81f2d12824546570bcc00732da8a9ae7893
4
+ data.tar.gz: 2190848581a020f389e3986b4c417005025c4ae6
5
5
  SHA512:
6
- metadata.gz: 3e62a0bcc2d7b58f4059b578dd2d5b8a3715768d29cc75b24e31660bae5f037551fdb2fa2d601e0c289b5eada5aad668d1e7dc38f93e482c2af998568eed06f0
7
- data.tar.gz: bce9377b820a4cea95a2e209efa60e09b8abc3c0e2f6723b0b98a816fb18ea89880c508c2f437bc42a29dab6f950d75650a14c514bb26f06d476871fb27e931b
6
+ metadata.gz: b8b88acd68d7ba6480e1d217942164b2ee7a729cbf650e4e363572ed644e7453e4c54fd769027bb0ca107fcf68ccbd4b29c96400cb1ae19761a51aa2eaede6c0
7
+ data.tar.gz: 54ebad558abaaa35ba4fa5b72117f9c0043f0191618d2caefd62e1784c8ef29438c723268b83c6a501ca4fea9103bc54d68ecd281fbfaaa83fc1da9362a3a3e3
data/CHANGELOG.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Change Log
2
2
 
3
- ## [Unreleased](https://github.com/skywinder/github-changelog-generator/tree/HEAD)
4
-
5
- [Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.9.0...HEAD)
3
+ ## [1.10.0](https://github.com/skywinder/github-changelog-generator/tree/1.10.0) (2016-01-05)
4
+ [Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.9.0...1.10.0)
6
5
 
7
6
  **Implemented enhancements:**
8
7
 
@@ -10,9 +9,14 @@
10
9
  - Introduce ParserError exception class [\#296](https://github.com/skywinder/github-changelog-generator/pull/296) ([olleolleolle](https://github.com/olleolleolle))
11
10
  - ParserFile: support values with equals signs [\#285](https://github.com/skywinder/github-changelog-generator/pull/285) ([olleolleolle](https://github.com/olleolleolle))
12
11
 
12
+ **Closed issues:**
13
+
14
+ - PRs not closed on master branch show up in changelog [\#280](https://github.com/skywinder/github-changelog-generator/issues/280)
15
+
13
16
  **Merged pull requests:**
14
17
 
15
18
  - Update bundler [\#306](https://github.com/skywinder/github-changelog-generator/pull/306) ([SteveGilvarry](https://github.com/SteveGilvarry))
19
+ - Fixes \#280 Add release-branch option to filter the Pull Requests [\#305](https://github.com/skywinder/github-changelog-generator/pull/305) ([SteveGilvarry](https://github.com/SteveGilvarry))
16
20
  - Add options to def self.user\_and\_project\_from\_git to fix parser.rb:19… [\#303](https://github.com/skywinder/github-changelog-generator/pull/303) ([SteveGilvarry](https://github.com/SteveGilvarry))
17
21
  - Git ignore coverage/ [\#300](https://github.com/skywinder/github-changelog-generator/pull/300) ([olleolleolle](https://github.com/olleolleolle))
18
22
  - \[refactor\] Fix docblock datatype, use \#map [\#299](https://github.com/skywinder/github-changelog-generator/pull/299) ([olleolleolle](https://github.com/olleolleolle))
data/Gemfile.lock CHANGED
@@ -1,62 +1,59 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github_changelog_generator (1.9.0)
4
+ github_changelog_generator (1.10.0)
5
5
  colorize (~> 0.7)
6
6
  github_api (~> 0.12)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.3.8)
12
- ast (2.0.0)
11
+ addressable (2.4.0)
12
+ ast (2.2.0)
13
13
  astrolabe (1.3.1)
14
14
  parser (~> 2.2)
15
- codeclimate-test-reporter (0.4.7)
15
+ codeclimate-test-reporter (0.4.8)
16
16
  simplecov (>= 0.7.1, < 1.0.0)
17
17
  colorize (0.7.7)
18
- coveralls (0.8.2)
18
+ coveralls (0.8.10)
19
19
  json (~> 1.8)
20
20
  rest-client (>= 1.6.8, < 2)
21
- simplecov (~> 0.10.0)
21
+ simplecov (~> 0.11.0)
22
22
  term-ansicolor (~> 1.3)
23
23
  thor (~> 0.19.1)
24
+ tins (~> 1.6.0)
24
25
  descendants_tracker (0.0.4)
25
26
  thread_safe (~> 0.3, >= 0.3.1)
26
27
  diff-lcs (1.2.5)
27
28
  docile (1.1.5)
28
- domain_name (0.5.24)
29
+ domain_name (0.5.25)
29
30
  unf (>= 0.0.5, < 1.0.0)
30
- faraday (0.9.1)
31
+ faraday (0.9.2)
31
32
  multipart-post (>= 1.2, < 3)
32
- github_api (0.12.4)
33
- addressable (~> 2.3)
33
+ github_api (0.13.1)
34
+ addressable (~> 2.4.0)
34
35
  descendants_tracker (~> 0.0.4)
35
36
  faraday (~> 0.8, < 0.10)
36
37
  hashie (>= 3.4)
37
38
  multi_json (>= 1.7.5, < 2.0)
38
- nokogiri (~> 1.6.6)
39
39
  oauth2
40
- hashie (3.4.2)
40
+ hashie (3.4.3)
41
41
  http-cookie (1.0.2)
42
42
  domain_name (~> 0.5)
43
43
  json (1.8.3)
44
- jwt (1.5.1)
45
- mime-types (2.6.1)
46
- mini_portile (0.6.2)
44
+ jwt (1.5.2)
45
+ mime-types (2.99)
47
46
  multi_json (1.11.2)
48
47
  multi_xml (0.5.5)
49
48
  multipart-post (2.0.0)
50
- netrc (0.10.3)
51
- nokogiri (1.6.6.2)
52
- mini_portile (~> 0.6.0)
49
+ netrc (0.11.0)
53
50
  oauth2 (1.0.0)
54
51
  faraday (>= 0.8, < 0.10)
55
52
  jwt (~> 1.0)
56
53
  multi_json (~> 1.3)
57
54
  multi_xml (~> 0.5)
58
55
  rack (~> 1.2)
59
- parser (2.2.2.6)
56
+ parser (2.2.3.0)
60
57
  ast (>= 1.1, < 3.0)
61
58
  powerpack (0.1.1)
62
59
  rack (1.6.4)
@@ -66,27 +63,28 @@ GEM
66
63
  http-cookie (>= 1.0.2, < 2.0)
67
64
  mime-types (>= 1.16, < 3.0)
68
65
  netrc (~> 0.7)
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)
66
+ rspec (3.4.0)
67
+ rspec-core (~> 3.4.0)
68
+ rspec-expectations (~> 3.4.0)
69
+ rspec-mocks (~> 3.4.0)
70
+ rspec-core (3.4.1)
71
+ rspec-support (~> 3.4.0)
72
+ rspec-expectations (3.4.0)
76
73
  diff-lcs (>= 1.2.0, < 2.0)
77
- rspec-support (~> 3.3.0)
78
- rspec-mocks (3.3.2)
74
+ rspec-support (~> 3.4.0)
75
+ rspec-mocks (3.4.0)
79
76
  diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.3.0)
81
- rspec-support (3.3.0)
82
- rubocop (0.32.1)
77
+ rspec-support (~> 3.4.0)
78
+ rspec-support (3.4.1)
79
+ rubocop (0.35.1)
83
80
  astrolabe (~> 1.3)
84
- parser (>= 2.2.2.5, < 3.0)
81
+ parser (>= 2.2.3.0, < 3.0)
85
82
  powerpack (~> 0.1)
86
83
  rainbow (>= 1.99.1, < 3.0)
87
- ruby-progressbar (~> 1.4)
84
+ ruby-progressbar (~> 1.7)
85
+ tins (<= 1.6.0)
88
86
  ruby-progressbar (1.7.5)
89
- simplecov (0.10.0)
87
+ simplecov (0.11.1)
90
88
  docile (~> 1.1.0)
91
89
  json (~> 1.8)
92
90
  simplecov-html (~> 0.10.0)
@@ -95,7 +93,7 @@ GEM
95
93
  tins (~> 1.0)
96
94
  thor (0.19.1)
97
95
  thread_safe (0.3.5)
98
- tins (1.5.4)
96
+ tins (1.6.0)
99
97
  unf (0.1.4)
100
98
  unf_ext
101
99
  unf_ext (0.0.7.1)
@@ -9,14 +9,14 @@ Gem::Specification.new do |spec|
9
9
  spec.version = GitHubChangelogGenerator::VERSION
10
10
  spec.default_executable = "github_changelog_generator"
11
11
 
12
- spec.required_ruby_version = ">= 1.9.3"
12
+ spec.required_ruby_version = ">= 1.9.3"
13
13
  spec.authors = ["Petr Korolev"]
14
14
  spec.email = "sky4winder+github_changelog_generator@gmail.com"
15
15
  spec.date = `date +"%Y-%m-%d"`.strip!
16
16
  spec.summary = "Script, that automatically generate changelog from your tags, issues, labels and pull requests."
17
17
  spec.description = "Changelog generation has never been so easy. Fully automate changelog generation - this gem generate change log file based on tags, issues and merged pull requests from Github issue tracker."
18
18
  spec.homepage = "https://github.com/skywinder/Github-Changelog-Generator"
19
- spec.license = "MIT"
19
+ spec.license = "MIT"
20
20
 
21
21
  spec.files = `git ls-files -z`.split("\x0")
22
22
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
data/lib/CHANGELOG.md CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  **Merged pull requests:**
24
24
 
25
- - Merged PR to Develop [\#19](https://github.com/skywinder/changelog_test/pull/19) ([skywinder](https://github.com/skywinder))
25
+ - Merged br \(should appear in change log also\) [\#21](https://github.com/skywinder/changelog_test/pull/21) ([skywinder](https://github.com/skywinder))
26
26
  - This a PR with a lot of comments and events [\#17](https://github.com/skywinder/changelog_test/pull/17) ([skywinder](https://github.com/skywinder))
27
27
  - This PR closes 14 from commit [\#15](https://github.com/skywinder/changelog_test/pull/15) ([skywinder](https://github.com/skywinder))
28
28
  - This PR to close \#12 from body [\#13](https://github.com/skywinder/changelog_test/pull/13) ([skywinder](https://github.com/skywinder))
@@ -18,12 +18,12 @@ module GitHubChangelogGenerator
18
18
  @user = @options[:user]
19
19
  @project = @options[:project]
20
20
  @github_token = fetch_github_token
21
- github_options = { per_page: PER_PAGE_NUMBER }
22
- github_options[:oauth_token] = @github_token unless @github_token.nil?
23
- github_options[:endpoint] = @options[:github_endpoint] unless @options[:github_endpoint].nil?
24
- github_options[:site] = @options[:github_endpoint] unless @options[:github_site].nil?
21
+ @github_options = { per_page: PER_PAGE_NUMBER }
22
+ @github_options[:oauth_token] = @github_token unless @github_token.nil?
23
+ @github_options[:endpoint] = @options[:github_endpoint] unless @options[:github_endpoint].nil?
24
+ @github_options[:site] = @options[:github_endpoint] unless @options[:github_site].nil?
25
25
 
26
- @github = check_github_response { Github.new github_options }
26
+ @github = check_github_response { Github.new @github_options }
27
27
  end
28
28
 
29
29
  # Returns GitHub token. First try to use variable, provided by --token option,
@@ -123,7 +123,16 @@ Make sure, that you push tags to remote repo via 'git push --tags'".yellow
123
123
  def fetch_closed_pull_requests
124
124
  pull_requests = []
125
125
  begin
126
- response = @github.pull_requests.list @options[:user], @options[:project], state: "closed"
126
+ if @options[:release_branch].nil?
127
+ response = @github.pull_requests.list @options[:user],
128
+ @options[:project],
129
+ state: "closed"
130
+ else
131
+ response = @github.pull_requests.list @options[:user],
132
+ @options[:project],
133
+ state: "closed",
134
+ base: @options[:release_branch]
135
+ end
127
136
  page_i = 0
128
137
  count_pages = response.count_pages
129
138
  response.each_page do |page|
@@ -178,8 +178,10 @@ module GitHubChangelogGenerator
178
178
  fetched_pr = closed_pull_requests.find do |fpr|
179
179
  fpr.number == pr.number
180
180
  end
181
- pr[:merged_at] = fetched_pr[:merged_at]
182
- closed_pull_requests.delete(fetched_pr)
181
+ if fetched_pr
182
+ pr[:merged_at] = fetched_pr[:merged_at]
183
+ closed_pull_requests.delete(fetched_pr)
184
+ end
183
185
  end
184
186
 
185
187
  pull_requests.select! do |pr|
@@ -143,6 +143,9 @@ module GitHubChangelogGenerator
143
143
  opts.on("--future-release [RELEASE-VERSION]", "Put the unreleased changes in the specified release number.") do |future_release|
144
144
  options[:future_release] = future_release
145
145
  end
146
+ opts.on("--release-branch [RELEASE-BRANCH]", "Limit pull requests to the release branch, such as master or release") do |release_branch|
147
+ options[:release_branch] = release_branch
148
+ end
146
149
  opts.on("--[no-]verbose", "Run verbosely. Default is true") do |v|
147
150
  options[:verbose] = v
148
151
  end
@@ -214,7 +217,7 @@ module GitHubChangelogGenerator
214
217
  #
215
218
  # @param [String] output of git remote command
216
219
  # @return [Array] user and project
217
- def self.user_project_from_option(arg0, arg1, github_site = nil)
220
+ def self.user_project_from_option(arg0, arg1, github_site)
218
221
  user = nil
219
222
  project = nil
220
223
  github_site ||= "github.com"
@@ -227,10 +230,10 @@ module GitHubChangelogGenerator
227
230
  param = match[2].nil?
228
231
  rescue
229
232
  puts "Can't detect user and name from first parameter: '#{arg0}' -> exit'"
230
- exit
233
+ return
231
234
  end
232
235
  if param
233
- exit
236
+ return
234
237
  else
235
238
  user = match[1]
236
239
  project = match[2]
@@ -273,9 +276,4 @@ module GitHubChangelogGenerator
273
276
  [user, project]
274
277
  end
275
278
  end
276
-
277
- if __FILE__ == $PROGRAM_NAME
278
- remote = "invalid reference to project"
279
- p user_project_from_option(ARGV[0], ARGV[1], remote)
280
- end
281
279
  end
@@ -16,7 +16,8 @@ module GitHubChangelogGenerator
16
16
  bug_labels enhancement_labels
17
17
  between_tags exclude_tags since_tag max_issues
18
18
  github_site github_endpoint simple_list
19
- future_release verbose release_url base )
19
+ future_release release_branch verbose release_url
20
+ base )
20
21
 
21
22
  OPTIONS.each do |o|
22
23
  attr_accessor o.to_sym
@@ -1,3 +1,3 @@
1
1
  module GitHubChangelogGenerator
2
- VERSION = "1.10.0"
2
+ VERSION = "1.10.1"
3
3
  end
@@ -28,16 +28,16 @@ describe GitHubChangelogGenerator::Parser do
28
28
  end
29
29
  describe ".user_project_from_option" do
30
30
  context "when option is invalid" do
31
- it("should exit") { expect { GitHubChangelogGenerator::Parser.user_project_from_option("blah", nil) }.to raise_error(SystemExit) }
31
+ it("should return nil") { expect(GitHubChangelogGenerator::Parser.user_project_from_option("blah", nil, nil)).to be_nil }
32
32
  end
33
33
 
34
34
  context "when option is valid" do
35
- subject { GitHubChangelogGenerator::Parser.user_project_from_option("skywinder/ActionSheetPicker-3.0", nil) }
35
+ subject { GitHubChangelogGenerator::Parser.user_project_from_option("skywinder/ActionSheetPicker-3.0", nil, nil) }
36
36
  it { is_expected.to be_a(Array) }
37
37
  it { is_expected.to match_array(["skywinder", "ActionSheetPicker-3.0"]) }
38
38
  end
39
39
  context "when option nil" do
40
- subject { GitHubChangelogGenerator::Parser.user_project_from_option(nil, nil) }
40
+ subject { GitHubChangelogGenerator::Parser.user_project_from_option(nil, nil, nil) }
41
41
  it { is_expected.to be_a(Array) }
42
42
  it { is_expected.to match_array([nil, nil]) }
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_changelog_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api