Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1232f339a0 | ||
|
|
3cc6418048 | ||
|
|
a4f93feb7d | ||
|
|
b0be9f8b06 | ||
|
|
aeaec739f5 | ||
|
|
bf27187dd3 | ||
|
|
0e0295645d | ||
|
|
b2fac89ec1 | ||
|
|
947163426b | ||
|
|
2900025f6f | ||
|
|
802fb44d38 | ||
|
|
8b299a0394 | ||
|
|
111931a958 | ||
|
|
5a47a075e2 | ||
|
|
a35d08f6c7 | ||
|
|
c2e73edc29 | ||
|
|
045dff7cbc | ||
|
|
7c85082e7d | ||
|
|
cc65da5153 | ||
|
|
c22f8b4a31 | ||
|
|
2c46d32531 | ||
|
|
e822ddfc98 | ||
|
|
25a9490a07 | ||
|
|
92a39a4107 | ||
|
|
583021b474 | ||
|
|
961aa20138 | ||
|
|
396622bec0 | ||
|
|
06575c9ab2 | ||
|
|
eba475ee76 | ||
|
|
aa88122d48 | ||
|
|
a69c2b5343 | ||
|
|
7fc862a100 | ||
|
|
87f95140d9 | ||
|
|
75ae6f4a3a | ||
|
|
31c13e8d1d | ||
|
|
a46fe7470b | ||
|
|
b15f6b2837 |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,5 +1,29 @@
|
||||
# Change Log
|
||||
|
||||
## [1.3.9](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.9) (2015-03-06)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.8...1.3.9)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Improve method of detecting owner and repository [\#63](https://github.com/skywinder/Github-Changelog-Generator/issues/63)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Concurrency problem in case of issues \> 2048 [\#65](https://github.com/skywinder/Github-Changelog-Generator/pull/65) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [1.3.8](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.8) (2015-03-05)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.6...1.3.8)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- 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))
|
||||
|
||||
## [1.3.6](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.6) (2015-03-05)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.5...1.3.6)
|
||||
|
||||
## [1.3.5](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.5) (2015-03-04)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.4...1.3.5)
|
||||
|
||||
28
README.md
28
README.md
@@ -62,8 +62,8 @@ Changelog generation has never been so easy.
|
||||
github_changelog_generator
|
||||
|
||||
- or from anywhere:
|
||||
|
||||
github_changelog_generator -u github_username -p github_project
|
||||
- `github_changelog_generator -u github_username -p github_project`
|
||||
- `github_changelog_generator github_username/github_project`
|
||||
|
||||
As output you will get `CHANGELOG.md` file with pretty *Markdown-formatted* changelog.
|
||||
|
||||
@@ -116,19 +116,19 @@ It's time to create this token or wait for 1 hour before GitHub reset the counte
|
||||
|
||||
##Features and advantages of this project
|
||||
- Generate canonical change log file, followed by [keepachangelog.com guidlines](http://keepachangelog.com/)
|
||||
- Simply add links for all closed issues and merged pull requests
|
||||
- Possible to generate **Unreleased** changes (closed issues that have not released yet)
|
||||
- Flexible format customisation:
|
||||
- Customize issues, that should be added to changelog
|
||||
- Custom date format supported
|
||||
- **GitHub Enterprise support** via command line options!
|
||||
- Flexible format **customisation**:
|
||||
- **Customize** issues, that **should be added** to changelog
|
||||
- **Custom date format** supported
|
||||
- Ability to manually specify in which version issue was fixed (in case, when closed date is not match) by setting `milestone` of issue the same name as tag of required version
|
||||
- Ability to exclude specific issues from change log (by labels)
|
||||
- Automatically exclude "questions" - issues marked as `question` labels (and other issues, that shouldn't be in change log file: with `duplicate invalid wontfix` labels)
|
||||
- Distinguish bug fixes, enchantments, and closed issues according labels.
|
||||
- **Issues** (closed issues w/o any labels)
|
||||
- **Merged pull-requests** (all merged pull-requests)
|
||||
- **Bug-fixes** (by label `bug` in issue)
|
||||
- **Enhancements** (by label `enhancement` in issue)
|
||||
- Ability to **exclude specific issues** from change log (by labels)
|
||||
- **Automatically exclude "questions"** - issues marked as `question` labels (and other issues, that shouldn't be in change log file: with `duplicate invalid wontfix` labels)
|
||||
- **Distinguish** bug fixes, enchantments, and closed issues **according labels**.
|
||||
- Issues (closed issues w/o any labels)
|
||||
- Merged pull-requests (all merged pull-requests)
|
||||
- Bug-fixes (by label `bug` in issue)
|
||||
- Enhancements (by label `enhancement` in issue)
|
||||
|
||||
###Alternatives
|
||||
Here is a [wikipage list of alternatives](https://github.com/skywinder/Github-Changelog-Generator/wiki/Alternatives), that I found. But no one was satisfy my requirements.
|
||||
@@ -139,7 +139,7 @@ Here is a [wikipage list of alternatives](https://github.com/skywinder/Github-Ch
|
||||
### Projects using this library
|
||||
[Wikipage with list of projects](https://github.com/skywinder/Github-Changelog-Generator/wiki/Projects-using-Github-Changelog-Generator)
|
||||
|
||||
*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.*
|
||||
*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.*
|
||||
|
||||
## Am I missed some essential feature?
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
||||
spec.email = %q{sky4winder+github_changelog_generator@gmail.com}
|
||||
spec.date = `date +"%Y-%m-%d"`.strip!
|
||||
spec.summary = %q{Script, that automatically generate changelog from your tags, issues, labels and pull requests.}
|
||||
spec.description = %q{Script, that automatically generate changelog from your tags, issues, labels and pull requests.}
|
||||
spec.description = %q{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.}
|
||||
spec.homepage = %q{https://github.com/skywinder/Github-Changelog-Generator}
|
||||
spec.license = "MIT"
|
||||
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
# Change Log
|
||||
|
||||
## [Unreleased](https://github.com/skywinder/changelog_test/tree/HEAD)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.3...HEAD)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Add automatically generated change log file. [\#5](https://github.com/skywinder/changelog_test/pull/5) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [v0.0.3](https://github.com/skywinder/changelog_test/tree/v0.0.3) (2015-03-04)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...v0.0.3)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- fix \#3. hotfix. Should appear in v0.0.3 [\#4](https://github.com/skywinder/changelog_test/pull/4) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
## [v0.0.2](https://github.com/skywinder/changelog_test/tree/v0.0.2) (2015-03-04)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.1...v0.0.2)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- 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))
|
||||
|
||||
## [v0.0.1](https://github.com/skywinder/changelog_test/tree/v0.0.1) (2015-03-02)
|
||||
|
||||
|
||||
|
||||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
||||
@@ -36,7 +36,6 @@ module GitHubChangelogGenerator
|
||||
|
||||
if @options[:pulls]
|
||||
@pull_requests = self.get_filtered_pull_requests
|
||||
self.fetch_merged_at_pull_requests
|
||||
else
|
||||
@pull_requests = []
|
||||
end
|
||||
@@ -138,12 +137,12 @@ module GitHubChangelogGenerator
|
||||
|
||||
def get_filtered_pull_requests
|
||||
|
||||
pull_requests = @pull_requests
|
||||
filtered_pull_requests = pull_requests
|
||||
self.fetch_merged_at_pull_requests
|
||||
|
||||
filtered_pull_requests = @pull_requests.select {|pr| pr[:merged_at] != nil }
|
||||
|
||||
unless @options[:include_labels].nil?
|
||||
filtered_pull_requests = pull_requests.select { |issue|
|
||||
filtered_pull_requests = @pull_requests.select { |issue|
|
||||
#add all labels from @options[:incluse_labels] array
|
||||
(issue.labels.map { |label| label.name } & @options[:include_labels]).any?
|
||||
}
|
||||
@@ -157,7 +156,7 @@ module GitHubChangelogGenerator
|
||||
end
|
||||
|
||||
if @options[:add_issues_wo_labels]
|
||||
issues_wo_labels = pull_requests.select {
|
||||
issues_wo_labels = @pull_requests.select {
|
||||
# add issues without any labels
|
||||
|issue| !issue.labels.map { |label| label.name }.any?
|
||||
}
|
||||
@@ -332,7 +331,7 @@ module GitHubChangelogGenerator
|
||||
|
||||
if filtered_issues.empty? && filtered_pull_requests.empty? && newer_tag.nil?
|
||||
# do not generate empty unreleased section
|
||||
return nil
|
||||
return ''
|
||||
end
|
||||
|
||||
self.create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
|
||||
@@ -593,11 +592,23 @@ module GitHubChangelogGenerator
|
||||
end
|
||||
|
||||
# Async fetching events:
|
||||
threads = []
|
||||
|
||||
fetch_events_async(@issues + @pull_requests)
|
||||
|
||||
#to clear line from prev print
|
||||
print " \r"
|
||||
|
||||
if @options[:verbose]
|
||||
puts 'Fetching events for issues and PR: Done!'
|
||||
end
|
||||
end
|
||||
|
||||
def fetch_events_async(issues)
|
||||
i = 0
|
||||
|
||||
@issues.each { |issue|
|
||||
max_thread_number = 50
|
||||
threads = []
|
||||
issues.each_slice(max_thread_number) { |issues_slice|
|
||||
issues_slice.each { |issue|
|
||||
threads << Thread.new {
|
||||
obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: issue['number']
|
||||
issue[:events] = obj.body
|
||||
@@ -605,24 +616,9 @@ module GitHubChangelogGenerator
|
||||
i +=1
|
||||
}
|
||||
}
|
||||
|
||||
@pull_requests.each { |pull_request|
|
||||
threads << Thread.new {
|
||||
obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: pull_request['number']
|
||||
pull_request[:events] = obj.body
|
||||
print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
|
||||
i +=1
|
||||
}
|
||||
}
|
||||
|
||||
threads.each { |thr| thr.join }
|
||||
|
||||
#to clear line from prev print
|
||||
print " \r"
|
||||
|
||||
if @options[:verbose]
|
||||
puts "Fetching events for issues and PR: Done! #{i}/#{@issues.count + @pull_requests.count}"
|
||||
end
|
||||
threads = []
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -26,7 +26,8 @@ module GitHubChangelogGenerator
|
||||
:filter_issues_by_milestone => true,
|
||||
:compare_link => true,
|
||||
:unreleased => true,
|
||||
:unreleased_label => 'Unreleased'
|
||||
:unreleased_label => 'Unreleased',
|
||||
:branch => 'origin'
|
||||
}
|
||||
|
||||
parser = OptionParser.new { |opts|
|
||||
@@ -128,12 +129,24 @@ module GitHubChangelogGenerator
|
||||
end
|
||||
|
||||
if !options[:user] && !options[:project]
|
||||
remote = `git remote -vv`.split("\n")
|
||||
match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)?(?:\.git).*/.match(remote[0])
|
||||
remote = `git config --get remote.#{options[:branch]}.url`
|
||||
# try to find repo in format:
|
||||
# origin git@github.com:skywinder/Github-Changelog-Generator.git (fetch)
|
||||
# git@github.com:skywinder/Github-Changelog-Generator.git
|
||||
match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)(?:\.git).*/.match(remote)
|
||||
|
||||
if match && match[1] && match[2]
|
||||
puts "Detected user:#{match[1]}, project:#{match[2]}"
|
||||
options[:user], options[:project] = match[1], match[2]
|
||||
else
|
||||
# try to find repo in format:
|
||||
# origin https://github.com/skywinder/ChangelogMerger (fetch)
|
||||
# https://github.com/skywinder/ChangelogMerger
|
||||
match = /.*\/((?:-|\w|\.)*)\/((?:-|\w|\.)*).*/.match(remote)
|
||||
if match && match[1] && match[2]
|
||||
puts "Detected user:#{match[1]}, project:#{match[2]}"
|
||||
options[:user], options[:project] = match[1], match[2]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module GitHubChangelogGenerator
|
||||
VERSION = '1.3.6'
|
||||
VERSION = '1.3.10'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user