github_changelog_generator 1.3.8 → 1.3.9

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: 19ea8ceff048952fab9c94b985c8c64c74ce924b
4
- data.tar.gz: 469711709c955b4057fcd5f70ea4414584ab1489
3
+ metadata.gz: 0445f0b783728bf9debe8323d3693fbd86c8d3b0
4
+ data.tar.gz: edbc8f9b1deef9e4e530824d69ff268e05b90c42
5
5
  SHA512:
6
- metadata.gz: 2bc65228a50ae0dbd3ebe843e0b671a19c81684317b88c6b37a67e32f9a91eb330cf066f725c2b6bacbfac7a0cea8d2521993944ec42445fb799eb2eb7168772
7
- data.tar.gz: 6731d228b8a5a7058eae2a4b21f2f183d5e6d0719ee2c0040fadbca94645c3f354b3819c886d721602835966ec965a9ef120d7b6a36eb1efdefd820295051931
6
+ metadata.gz: 3a09af3b6ff45d6597d67441efbb524d453dd838298c79f97f8467c327a083d997d9ad00ffbff6d71144de4af5c1b1bb3d2a618519eade887cd5e3cfe6ddd717
7
+ data.tar.gz: dd9a11d05abe6bc11cc02fb6bc890a062d480edfd2218beaf9cf7af6f0d9b460cc5a9206659b50e19e4f43c908dce618143c32a3f9cd0c2dee66f8e7fcfd40dc
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## [1.3.8](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.8) (2015-03-05)
4
+
5
+ [Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.6...1.3.8)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Fix `git remote` parsing in case, when script running without parameters inside destination directory [\#61](https://github.com/skywinder/Github-Changelog-Generator/pull/61) ([skywinder](https://github.com/skywinder))
10
+
3
11
  ## [1.3.6](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.6) (2015-03-05)
4
12
 
5
13
  [Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.5...1.3.6)
data/README.md CHANGED
@@ -139,7 +139,7 @@ Here is a [wikipage list of alternatives](https://github.com/skywinder/Github-Ch
139
139
  ### Projects using this library
140
140
  [Wikipage with list of projects](https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator)
141
141
 
142
- *If you are using `github_changelog_generator` for generation change log in your project or know of project that uses it, please add it to [this] (https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator) list.*
142
+ *If you are using `github_changelog_generator` for generation change log in your project or know another project that uses it, please add it to [this] (https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator) list.*
143
143
 
144
144
  ## Am I missed some essential feature?
145
145
 
@@ -2,16 +2,28 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/skywinder/changelog_test/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...HEAD)
5
+ [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.3...HEAD)
6
6
 
7
7
  **Merged pull requests:**
8
8
 
9
- - Here is a test hotfix should appear in v.0.0.2 [\#2](https://github.com/skywinder/changelog_test/pull/2) ([skywinder](https://github.com/skywinder))
9
+ - Add automatically generated change log file. [\#5](https://github.com/skywinder/changelog_test/pull/5) ([skywinder](https://github.com/skywinder))
10
+
11
+ ## [v0.0.3](https://github.com/skywinder/changelog_test/tree/v0.0.3) (2015-03-04)
12
+
13
+ [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...v0.0.3)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - fix \#3. hotfix. Should appear in v0.0.3 [\#4](https://github.com/skywinder/changelog_test/pull/4) ([skywinder](https://github.com/skywinder))
10
18
 
11
19
  ## [v0.0.2](https://github.com/skywinder/changelog_test/tree/v0.0.2) (2015-03-04)
12
20
 
13
21
  [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.1...v0.0.2)
14
22
 
23
+ **Merged pull requests:**
24
+
25
+ - Here is a test hotfix should appear in v.0.0.2 [\#2](https://github.com/skywinder/changelog_test/pull/2) ([skywinder](https://github.com/skywinder))
26
+
15
27
  ## [v0.0.1](https://github.com/skywinder/changelog_test/tree/v0.0.1) (2015-03-02)
16
28
 
17
29
 
@@ -593,38 +593,35 @@ module GitHubChangelogGenerator
593
593
  end
594
594
 
595
595
  # Async fetching events:
596
- threads = []
597
596
 
598
- i = 0
599
-
600
- @issues.each { |issue|
601
- threads << Thread.new {
602
- obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: issue['number']
603
- issue[:events] = obj.body
604
- print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
605
- i +=1
606
- }
607
- }
608
-
609
- @pull_requests.each { |pull_request|
610
- threads << Thread.new {
611
- obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: pull_request['number']
612
- pull_request[:events] = obj.body
613
- print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
614
- i +=1
615
- }
616
- }
617
-
618
- threads.each { |thr| thr.join }
597
+ fetch_events_async(@issues + @pull_requests)
619
598
 
620
599
  #to clear line from prev print
621
600
  print " \r"
622
601
 
623
602
  if @options[:verbose]
624
- puts "Fetching events for issues and PR: Done! #{i}/#{@issues.count + @pull_requests.count}"
603
+ puts 'Fetching events for issues and PR: Done!'
625
604
  end
626
605
  end
627
606
 
607
+ def fetch_events_async(issues)
608
+ i = 0
609
+ max_thread_number = 50
610
+ threads = []
611
+ issues.each_slice(max_thread_number) { |issues_slice|
612
+ issues_slice.each { |issue|
613
+ threads << Thread.new {
614
+ obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: issue['number']
615
+ issue[:events] = obj.body
616
+ print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
617
+ i +=1
618
+ }
619
+ }
620
+ threads.each { |thr| thr.join }
621
+ threads = []
622
+ }
623
+ end
624
+
628
625
  end
629
626
 
630
627
  if __FILE__ == $0
@@ -129,17 +129,20 @@ module GitHubChangelogGenerator
129
129
  end
130
130
 
131
131
  if !options[:user] && !options[:project]
132
- remote = `git remote -vv`.split("\n")
133
- # try to find repo in format: origin git@github.com:skywinder/Github-Changelog-Generator.git (fetch)
134
- remote.select { |v| v.include? options[:branch] }
135
- match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)(?:\.git).*/.match(remote[0])
132
+ remote = `git config --get remote.#{options[:branch]}.url`
133
+ # try to find repo in format:
134
+ # origin git@github.com:skywinder/Github-Changelog-Generator.git (fetch)
135
+ # git@github.com:skywinder/Github-Changelog-Generator.git
136
+ match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)(?:\.git).*/.match(remote)
136
137
 
137
138
  if match && match[1] && match[2]
138
139
  puts "Detected user:#{match[1]}, project:#{match[2]}"
139
140
  options[:user], options[:project] = match[1], match[2]
140
141
  else
141
- # try to find repo in format: origin https://github.com/skywinder/ChangelogMerger (fetch)
142
- match = /.*\/((?:-|\w|\.)*)\/((?:-|\w|\.)*).*/.match(remote[0])
142
+ # try to find repo in format:
143
+ # origin https://github.com/skywinder/ChangelogMerger (fetch)
144
+ # https://github.com/skywinder/ChangelogMerger
145
+ match = /.*\/((?:-|\w|\.)*)\/((?:-|\w|\.)*).*/.match(remote)
143
146
  if match && match[1] && match[2]
144
147
  puts "Detected user:#{match[1]}, project:#{match[2]}"
145
148
  options[:user], options[:project] = match[1], match[2]
@@ -1,3 +1,3 @@
1
1
  module GitHubChangelogGenerator
2
- VERSION = '1.3.8'
2
+ VERSION = '1.3.9'
3
3
  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.3.8
4
+ version: 1.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-05 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler