Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6406168b15 | ||
|
|
7b38f0f56a | ||
|
|
7704dc9ecd | ||
|
|
25ee41bc8c | ||
|
|
219f4b9748 | ||
|
|
de33edd3ce | ||
|
|
6db717a5ee | ||
|
|
5fb5832cf5 | ||
|
|
a55b938ccf | ||
|
|
d1b3e09da3 | ||
|
|
4d094ba211 | ||
|
|
3d7aa0b7c5 | ||
|
|
ada6f13de5 | ||
|
|
9479979fed | ||
|
|
30e9ab0ec3 | ||
|
|
8d5bdbcca7 | ||
|
|
a514224625 | ||
|
|
4162bc8659 | ||
|
|
06d49a1e44 | ||
|
|
dbb385d049 | ||
|
|
abe19eedbe | ||
|
|
32149b8a2c | ||
|
|
e5f6670a07 | ||
|
|
83e406ca5f | ||
|
|
8c7f1a7390 | ||
|
|
f248e1c718 | ||
|
|
fdcf5ccf7e | ||
|
|
2b46ba2a11 | ||
|
|
f6388903b7 | ||
|
|
e51bceda05 | ||
|
|
165e8d4e9f | ||
|
|
79f16947b7 | ||
|
|
432f12af70 | ||
|
|
a1b19044c2 | ||
|
|
70e8c287f5 | ||
|
|
78ca34ff7c | ||
|
|
2f3e754a6b | ||
|
|
8c20913af4 | ||
|
|
f14b081126 | ||
|
|
315a92b7b3 | ||
|
|
cca51aa19f | ||
|
|
56b1398081 | ||
|
|
1232f339a0 | ||
|
|
3cc6418048 | ||
|
|
a4f93feb7d | ||
|
|
b0be9f8b06 | ||
|
|
aeaec739f5 | ||
|
|
bf27187dd3 | ||
|
|
0e0295645d | ||
|
|
b2fac89ec1 | ||
|
|
947163426b | ||
|
|
2900025f6f | ||
|
|
802fb44d38 | ||
|
|
8b299a0394 | ||
|
|
111931a958 | ||
|
|
5a47a075e2 |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,5 +1,29 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## [1.3.10](https://github.com/skywinder/Github-Changelog-Generator/tree/1.3.10) (2015-03-18)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.9...1.3.10)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Exclude closed PR's from changelog. [\#69](https://github.com/skywinder/Github-Changelog-Generator/issues/69)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix termination in case of empty unreleased section with `--unreleased-only` option. [\#70](https://github.com/skywinder/Github-Changelog-Generator/pull/70) ([skywinder](https://github.com/skywinder))
|
||||||
|
|
||||||
|
## [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:**
|
||||||
|
|
||||||
|
- Resolved 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)
|
## [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)
|
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.3.6...1.3.8)
|
||||||
|
|||||||
96
README.md
96
README.md
@@ -1,8 +1,7 @@
|
|||||||
|
|
||||||
[](http://badge.fury.io/rb/github_changelog_generator)
|
[](http://badge.fury.io/rb/github_changelog_generator)
|
||||||
[](https://travis-ci.org/skywinder/Github-Changelog-Generator)
|
[](https://travis-ci.org/skywinder/github-changelog-generator)
|
||||||
|
|
||||||
GitHub Changelog Generator
|
GitHub Changelog Generator 
|
||||||
==================
|
==================
|
||||||
|
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
@@ -13,14 +12,23 @@ GitHub Changelog Generator
|
|||||||
- [Features and advantages of this project](#features-and-advantages-of-this-project)
|
- [Features and advantages of this project](#features-and-advantages-of-this-project)
|
||||||
- [Alternatives](#alternatives)
|
- [Alternatives](#alternatives)
|
||||||
- [Projects using this library](#projects-using-this-library)
|
- [Projects using this library](#projects-using-this-library)
|
||||||
- [Am I missed some essential feature?](#am-i-missed-some-essential-feature)
|
- [Am I missing some essential feature?](#am-i-missing-some-essential-feature)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
|
|
||||||
Changelog generation has never been so easy.
|
### 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**. This generator complies all [change log format guidelines](http://keepachangelog.com/).
|
**Fully automate changelog generation** - This gem generates change log file based on **tags**, **issues** and merged **pull requests** (and splits them into separate lists according labels) from :octocat: GitHub Issue Tracker.
|
||||||
|
|
||||||
|
Since now you don't have to fill your `CHANGELOG.md` manually: just run the script, relax and take a cup of :coffee: before your next release! :tada:
|
||||||
|
|
||||||
|
>### *What’s the point of a change log?*
|
||||||
|
To make it easier for users and contributors to see precisely what notable changes have been made between each release (or version) of the project.
|
||||||
|
### *Why should I care?*
|
||||||
|
Because software tools are for people. If you don’t care, why are you contributing to open source? Surely, there must be a kernel (ha!) of care somewhere in that lovely little brain of yours.
|
||||||
|
|
||||||
|
> :copyright: *[http://keepachangelog.com](http://keepachangelog.com/)*
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -57,13 +65,13 @@ Changelog generation has never been so easy.
|
|||||||
## Usage
|
## Usage
|
||||||
**It's really simple**:
|
**It's really simple**:
|
||||||
|
|
||||||
- If your **git remote** `origin` refer to your GitHub repo, then just go to your project folder and run:
|
- If your **git remote** `origin` refers to your GitHub repo, then just go to your project folder and run:
|
||||||
|
|
||||||
github_changelog_generator
|
github_changelog_generator
|
||||||
|
|
||||||
- or from anywhere:
|
- 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.
|
As output you will get `CHANGELOG.md` file with pretty *Markdown-formatted* changelog.
|
||||||
|
|
||||||
@@ -96,7 +104,7 @@ Type `github_changelog_generator --help` for detailed usage.
|
|||||||
|
|
||||||
### GitHub token
|
### GitHub token
|
||||||
|
|
||||||
Since GitHub allow to make only 50 requests without authentication it's recommended to run this script with token
|
Since GitHub allows you to make only 50 requests without authentication it's recommended to run this script with a token (`-t, --token` option)
|
||||||
|
|
||||||
**You can easily [generate it here](https://github.com/settings/applications)**.
|
**You can easily [generate it here](https://github.com/settings/applications)**.
|
||||||
|
|
||||||
@@ -115,23 +123,27 @@ So, if you got error like this:
|
|||||||
It's time to create this token or wait for 1 hour before GitHub reset the counter for your IP.
|
It's time to create this token or wait for 1 hour before GitHub reset the counter for your IP.
|
||||||
|
|
||||||
##Features and advantages of this project
|
##Features and advantages of this project
|
||||||
- Generate canonical change log file, followed by [keepachangelog.com guidlines](http://keepachangelog.com/)
|
- Generate canonical, neat change log file, followed by [basic change log guidlines](http://keepachangelog.com/) :gem:
|
||||||
- Simply add links for all closed issues and merged pull requests
|
- Possible to generate **Unreleased** changes (closed issues that have not released yet) :dizzy:
|
||||||
- Possible to generate **Unreleased** changes (closed issues that have not released yet)
|
- **GitHub Enterprise support** via command line options! :factory:
|
||||||
- Flexible format customisation:
|
- Flexible format **customisation**:
|
||||||
- Customize issues, that should be added to changelog
|
- **Customize** issues, that **should be added** to changelog :eight_spoked_asterisk:
|
||||||
- Custom date format supported
|
- **Custom date format** supported (but get in mind [ISO 8601](http://xkcd.com/1179/) ) :date:
|
||||||
- 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 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 :pushpin:
|
||||||
- Ability to exclude specific issues from change log (by labels)
|
- Automatically **exclude specific issues**, not-related to change log (any issue, that has label `question` `duplicate` `invalid` `wontfix`by default) :scissors:
|
||||||
- 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** issues **according labels**. :mag_right:
|
||||||
- Distinguish bug fixes, enchantments, and closed issues according labels.
|
- Merged pull requests (all `merged` pull-requests) :twisted_rightwards_arrows:
|
||||||
- **Issues** (closed issues w/o any labels)
|
- Bug fixes (by label `bug` in issue) :beetle:
|
||||||
- **Merged pull-requests** (all merged pull-requests)
|
- Enhancements (by label `enhancement` in issue) :star2:
|
||||||
- **Bug-fixes** (by label `bug` in issue)
|
- Issues (closed issues `w/o any labels`) :non-potable_water:
|
||||||
- **Enhancements** (by label `enhancement` in issue)
|
|
||||||
|
- You can manually set which labels should be included/excluded. :wrench:
|
||||||
|
- Apply a lot of other customisations, to fit changelog for your personal style :tophat:
|
||||||
|
(*look `github_changelog_generator --help` for details)*
|
||||||
|
|
||||||
|
|
||||||
###Alternatives
|
###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.
|
Here is a [wikipage list of alternatives](https://github.com/skywinder/Github-Changelog-Generator/wiki/Alternatives), that I found. But none satisfied my requirements.
|
||||||
|
|
||||||
*If you know other projects - feel free to edit this Wiki page!*
|
*If you know other projects - feel free to edit this Wiki page!*
|
||||||
|
|
||||||
@@ -141,13 +153,38 @@ Here is a [wikipage list of alternatives](https://github.com/skywinder/Github-Ch
|
|||||||
|
|
||||||
*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.*
|
*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?
|
## Am I missing some essential feature?
|
||||||
|
|
||||||
**Nothing is impossible!**
|
- **Nothing is impossible!**
|
||||||
|
|
||||||
Open an [issue](https://github.com/skywinder/Github-Changelog-Generator/issues/new) and let's make generator better together!
|
- Open an [issue](https://github.com/skywinder/Github-Changelog-Generator/issues/new) and let's make generator better together!
|
||||||
|
|
||||||
*Bug reports, feature requests, patches, well-wishes are always welcome!*
|
- *Bug reports, feature requests, patches, well-wishes are always welcome* :heavy_exclamation_mark:
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
- ***I already use GitHub Releases. Why do I need this?***
|
||||||
|
|
||||||
|
GitHub Releases is a very good thing. And it's very good practice to maintain it (not so much people using it yet)! :congratulations:
|
||||||
|
|
||||||
|
*BDW: I would like to support GitHub Releases in [next releases](https://github.com/skywinder/github-changelog-generator/issues/56) ;)*
|
||||||
|
|
||||||
|
I'm not try to compare quality of auto-generated and manually generated logs.. but:
|
||||||
|
|
||||||
|
The auto generated Changelog really helps even if you manually fill Releases notes!
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
When I found a closed bug - it's very useful to understand, in which release it was fixed. In that case you can easily find this issue by \# in `CHANGELOG.md`.
|
||||||
|
|
||||||
|
- it's not so quite easy to find it in manually filled Releases notes.
|
||||||
|
- this file can also help you to build your Release note and not miss features in manually-filled list.
|
||||||
|
|
||||||
|
In the end:
|
||||||
|
|
||||||
|
I think, that GitHub Releases is more for end-users.
|
||||||
|
But `CHANGELOG.md` could stay in the repo for developers with detailed list of changes.
|
||||||
|
And it's nothing bad to combine GitHub Releases and `CHANGELOG.md` file together in that manner.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
@@ -157,6 +194,7 @@ Open an [issue](https://github.com/skywinder/Github-Changelog-Generator/issues/n
|
|||||||
4. Commit your changes (`git commit -am 'Add some feature'`)
|
4. Commit your changes (`git commit -am 'Add some feature'`)
|
||||||
5. Push to the branch (`git push origin my-new-feature`)
|
5. Push to the branch (`git push origin my-new-feature`)
|
||||||
6. Create a new Pull Request
|
6. Create a new Pull Request
|
||||||
|
7. Profit! :white_check_mark:
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
BIN
images/logo.jpg
Normal file
BIN
images/logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
@@ -27,7 +27,11 @@ module GitHubChangelogGenerator
|
|||||||
github_options[:endpoint] = options[:github_endpoint] unless options[:github_endpoint].nil?
|
github_options[:endpoint] = options[:github_endpoint] unless options[:github_endpoint].nil?
|
||||||
github_options[:site] = options[:github_endpoint] unless options[:github_site].nil?
|
github_options[:site] = options[:github_endpoint] unless options[:github_site].nil?
|
||||||
|
|
||||||
|
begin
|
||||||
@github = Github.new github_options
|
@github = Github.new github_options
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
|
|
||||||
@generator = Generator.new(@options)
|
@generator = Generator.new(@options)
|
||||||
|
|
||||||
@@ -36,7 +40,6 @@ module GitHubChangelogGenerator
|
|||||||
|
|
||||||
if @options[:pulls]
|
if @options[:pulls]
|
||||||
@pull_requests = self.get_filtered_pull_requests
|
@pull_requests = self.get_filtered_pull_requests
|
||||||
self.fetch_merged_at_pull_requests
|
|
||||||
else
|
else
|
||||||
@pull_requests = []
|
@pull_requests = []
|
||||||
end
|
end
|
||||||
@@ -88,8 +91,12 @@ module GitHubChangelogGenerator
|
|||||||
if event[:commit_id].nil?
|
if event[:commit_id].nil?
|
||||||
issue[:actual_date] = issue[:closed_at]
|
issue[:actual_date] = issue[:closed_at]
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
begin
|
begin
|
||||||
commit = @github.git_data.commits.get @options[:user], @options[:project], event[:commit_id]
|
commit = @github.git_data.commits.get @options[:user], @options[:project], event[:commit_id]
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
issue[:actual_date] = commit[:author][:date]
|
issue[:actual_date] = commit[:author][:date]
|
||||||
rescue
|
rescue
|
||||||
puts "Warning: can't fetch commit #{event[:commit_id]} probably it referenced from another repo."
|
puts "Warning: can't fetch commit #{event[:commit_id]} probably it referenced from another repo."
|
||||||
@@ -111,9 +118,9 @@ module GitHubChangelogGenerator
|
|||||||
if @options[:verbose]
|
if @options[:verbose]
|
||||||
print "Fetching merged dates...\r"
|
print "Fetching merged dates...\r"
|
||||||
end
|
end
|
||||||
response = @github.pull_requests.list @options[:user], @options[:project], :state => 'closed'
|
|
||||||
|
|
||||||
pull_requests = []
|
pull_requests = []
|
||||||
|
begin
|
||||||
|
response = @github.pull_requests.list @options[:user], @options[:project], :state => 'closed'
|
||||||
page_i = 0
|
page_i = 0
|
||||||
response.each_page do |page|
|
response.each_page do |page|
|
||||||
page_i += PER_PAGE_NUMBER
|
page_i += PER_PAGE_NUMBER
|
||||||
@@ -121,6 +128,12 @@ module GitHubChangelogGenerator
|
|||||||
print "Fetching merged dates... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
print "Fetching merged dates... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||||
pull_requests.concat(page)
|
pull_requests.concat(page)
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print " \r"
|
print " \r"
|
||||||
|
|
||||||
@pull_requests.each { |pr|
|
@pull_requests.each { |pr|
|
||||||
@@ -138,12 +151,12 @@ module GitHubChangelogGenerator
|
|||||||
|
|
||||||
def get_filtered_pull_requests
|
def get_filtered_pull_requests
|
||||||
|
|
||||||
pull_requests = @pull_requests
|
self.fetch_merged_at_pull_requests
|
||||||
filtered_pull_requests = pull_requests
|
|
||||||
|
|
||||||
|
filtered_pull_requests = @pull_requests.select {|pr| pr[:merged_at] != nil }
|
||||||
|
|
||||||
unless @options[:include_labels].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
|
#add all labels from @options[:incluse_labels] array
|
||||||
(issue.labels.map { |label| label.name } & @options[:include_labels]).any?
|
(issue.labels.map { |label| label.name } & @options[:include_labels]).any?
|
||||||
}
|
}
|
||||||
@@ -157,7 +170,7 @@ module GitHubChangelogGenerator
|
|||||||
end
|
end
|
||||||
|
|
||||||
if @options[:add_issues_wo_labels]
|
if @options[:add_issues_wo_labels]
|
||||||
issues_wo_labels = pull_requests.select {
|
issues_wo_labels = @pull_requests.select {
|
||||||
# add issues without any labels
|
# add issues without any labels
|
||||||
|issue| !issue.labels.map { |label| label.name }.any?
|
|issue| !issue.labels.map { |label| label.name }.any?
|
||||||
}
|
}
|
||||||
@@ -277,7 +290,11 @@ module GitHubChangelogGenerator
|
|||||||
end
|
end
|
||||||
|
|
||||||
def is_megred(number)
|
def is_megred(number)
|
||||||
|
begin
|
||||||
@github.pull_requests.merged? @options[:user], @options[:project], number
|
@github.pull_requests.merged? @options[:user], @options[:project], number
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_all_tags
|
def get_all_tags
|
||||||
@@ -286,9 +303,10 @@ module GitHubChangelogGenerator
|
|||||||
print "Fetching tags...\r"
|
print "Fetching tags...\r"
|
||||||
end
|
end
|
||||||
|
|
||||||
response = @github.repos.tags @options[:user], @options[:project]
|
|
||||||
|
|
||||||
tags = []
|
tags = []
|
||||||
|
|
||||||
|
begin
|
||||||
|
response = @github.repos.tags @options[:user], @options[:project]
|
||||||
page_i = 0
|
page_i = 0
|
||||||
count_pages = response.count_pages
|
count_pages = response.count_pages
|
||||||
response.each_page do |page|
|
response.each_page do |page|
|
||||||
@@ -300,6 +318,11 @@ module GitHubChangelogGenerator
|
|||||||
if @options[:verbose]
|
if @options[:verbose]
|
||||||
puts "Found #{tags.count} tags"
|
puts "Found #{tags.count} tags"
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tags
|
tags
|
||||||
end
|
end
|
||||||
@@ -332,7 +355,7 @@ module GitHubChangelogGenerator
|
|||||||
|
|
||||||
if filtered_issues.empty? && filtered_pull_requests.empty? && newer_tag.nil?
|
if filtered_issues.empty? && filtered_pull_requests.empty? && newer_tag.nil?
|
||||||
# do not generate empty unreleased section
|
# do not generate empty unreleased section
|
||||||
return nil
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
self.create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
|
self.create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
|
||||||
@@ -513,7 +536,11 @@ module GitHubChangelogGenerator
|
|||||||
return @tag_times_hash[tag_name['name']]
|
return @tag_times_hash[tag_name['name']]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
github_git_data_commits_get = @github.git_data.commits.get @options[:user], @options[:project], tag_name['commit']['sha']
|
github_git_data_commits_get = @github.git_data.commits.get @options[:user], @options[:project], tag_name['commit']['sha']
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
time_string = github_git_data_commits_get['committer']['date']
|
time_string = github_git_data_commits_get['committer']['date']
|
||||||
@tag_times_hash[tag_name['name']] = Time.parse(time_string)
|
@tag_times_hash[tag_name['name']] = Time.parse(time_string)
|
||||||
end
|
end
|
||||||
@@ -559,10 +586,10 @@ module GitHubChangelogGenerator
|
|||||||
if @options[:verbose]
|
if @options[:verbose]
|
||||||
print "Fetching closed issues...\r"
|
print "Fetching closed issues...\r"
|
||||||
end
|
end
|
||||||
|
|
||||||
response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil
|
|
||||||
|
|
||||||
issues = []
|
issues = []
|
||||||
|
|
||||||
|
begin
|
||||||
|
response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil
|
||||||
page_i = 0
|
page_i = 0
|
||||||
count_pages = response.count_pages
|
count_pages = response.count_pages
|
||||||
response.each_page do |page|
|
response.each_page do |page|
|
||||||
@@ -570,6 +597,11 @@ module GitHubChangelogGenerator
|
|||||||
print "Fetching issues... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
print "Fetching issues... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||||
issues.concat(page)
|
issues.concat(page)
|
||||||
end
|
end
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print " \r"
|
print " \r"
|
||||||
|
|
||||||
@@ -611,7 +643,11 @@ module GitHubChangelogGenerator
|
|||||||
issues.each_slice(max_thread_number) { |issues_slice|
|
issues.each_slice(max_thread_number) { |issues_slice|
|
||||||
issues_slice.each { |issue|
|
issues_slice.each { |issue|
|
||||||
threads << Thread.new {
|
threads << Thread.new {
|
||||||
|
begin
|
||||||
obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: issue['number']
|
obj = @github.issues.events.list user: @options[:user], repo: @options[:project], issue_number: issue['number']
|
||||||
|
rescue
|
||||||
|
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||||
|
end
|
||||||
issue[:events] = obj.body
|
issue[:events] = obj.body
|
||||||
print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
|
print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
|
||||||
i +=1
|
i +=1
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module GitHubChangelogGenerator
|
module GitHubChangelogGenerator
|
||||||
VERSION = '1.3.9'
|
VERSION = '1.3.11'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user