Compare commits
42 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 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
# 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)
|
||||
@@ -10,7 +22,7 @@
|
||||
|
||||
**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))
|
||||
- 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)
|
||||
|
||||
|
||||
90
README.md
90
README.md
@@ -1,8 +1,7 @@
|
||||
|
||||
[](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)
|
||||
@@ -13,14 +12,23 @@ GitHub Changelog Generator
|
||||
- [Features and advantages of this project](#features-and-advantages-of-this-project)
|
||||
- [Alternatives](#alternatives)
|
||||
- [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)
|
||||
- [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
|
||||
|
||||
@@ -57,7 +65,7 @@ Changelog generation has never been so easy.
|
||||
## Usage
|
||||
**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
|
||||
|
||||
@@ -96,7 +104,7 @@ Type `github_changelog_generator --help` for detailed usage.
|
||||
|
||||
### 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)**.
|
||||
|
||||
@@ -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.
|
||||
|
||||
##Features and advantages of this project
|
||||
- Generate canonical change log file, followed by [keepachangelog.com guidlines](http://keepachangelog.com/)
|
||||
- Possible to generate **Unreleased** changes (closed issues that have not released yet)
|
||||
- **GitHub Enterprise support** via command line options!
|
||||
- Generate canonical, neat change log file, followed by [basic change log guidlines](http://keepachangelog.com/) :gem:
|
||||
- Possible to generate **Unreleased** changes (closed issues that have not released yet) :dizzy:
|
||||
- **GitHub Enterprise support** via command line options! :factory:
|
||||
- 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)
|
||||
- **Customize** issues, that **should be added** to changelog :eight_spoked_asterisk:
|
||||
- **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 :pushpin:
|
||||
- Automatically **exclude specific issues**, not-related to change log (any issue, that has label `question` `duplicate` `invalid` `wontfix`by default) :scissors:
|
||||
- **Distinguish** issues **according labels**. :mag_right:
|
||||
- Merged pull requests (all `merged` pull-requests) :twisted_rightwards_arrows:
|
||||
- Bug fixes (by label `bug` in issue) :beetle:
|
||||
- Enhancements (by label `enhancement` in issue) :star2:
|
||||
- Issues (closed issues `w/o any labels`) :non-potable_water:
|
||||
|
||||
- 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
|
||||
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!*
|
||||
|
||||
@@ -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.*
|
||||
|
||||
## 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
|
||||
|
||||
@@ -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'`)
|
||||
5. Push to the branch (`git push origin my-new-feature`)
|
||||
6. Create a new Pull Request
|
||||
7. Profit! :white_check_mark:
|
||||
|
||||
## 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[:site] = options[:github_endpoint] unless options[:github_site].nil?
|
||||
|
||||
begin
|
||||
@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)
|
||||
|
||||
@@ -88,7 +92,11 @@ module GitHubChangelogGenerator
|
||||
issue[:actual_date] = issue[:closed_at]
|
||||
else
|
||||
begin
|
||||
begin
|
||||
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]
|
||||
rescue
|
||||
puts "Warning: can't fetch commit #{event[:commit_id]} probably it referenced from another repo."
|
||||
@@ -110,9 +118,9 @@ module GitHubChangelogGenerator
|
||||
if @options[:verbose]
|
||||
print "Fetching merged dates...\r"
|
||||
end
|
||||
response = @github.pull_requests.list @options[:user], @options[:project], :state => 'closed'
|
||||
|
||||
pull_requests = []
|
||||
begin
|
||||
response = @github.pull_requests.list @options[:user], @options[:project], :state => 'closed'
|
||||
page_i = 0
|
||||
response.each_page do |page|
|
||||
page_i += PER_PAGE_NUMBER
|
||||
@@ -120,6 +128,12 @@ module GitHubChangelogGenerator
|
||||
print "Fetching merged dates... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||
pull_requests.concat(page)
|
||||
end
|
||||
rescue
|
||||
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||
end
|
||||
|
||||
|
||||
|
||||
print " \r"
|
||||
|
||||
@pull_requests.each { |pr|
|
||||
@@ -276,7 +290,11 @@ module GitHubChangelogGenerator
|
||||
end
|
||||
|
||||
def is_megred(number)
|
||||
begin
|
||||
@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
|
||||
|
||||
def get_all_tags
|
||||
@@ -285,9 +303,10 @@ module GitHubChangelogGenerator
|
||||
print "Fetching tags...\r"
|
||||
end
|
||||
|
||||
response = @github.repos.tags @options[:user], @options[:project]
|
||||
|
||||
tags = []
|
||||
|
||||
begin
|
||||
response = @github.repos.tags @options[:user], @options[:project]
|
||||
page_i = 0
|
||||
count_pages = response.count_pages
|
||||
response.each_page do |page|
|
||||
@@ -299,6 +318,11 @@ module GitHubChangelogGenerator
|
||||
if @options[:verbose]
|
||||
puts "Found #{tags.count} tags"
|
||||
end
|
||||
rescue
|
||||
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||
end
|
||||
|
||||
|
||||
|
||||
tags
|
||||
end
|
||||
@@ -512,7 +536,11 @@ module GitHubChangelogGenerator
|
||||
return @tag_times_hash[tag_name['name']]
|
||||
end
|
||||
|
||||
begin
|
||||
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']
|
||||
@tag_times_hash[tag_name['name']] = Time.parse(time_string)
|
||||
end
|
||||
@@ -558,10 +586,10 @@ module GitHubChangelogGenerator
|
||||
if @options[:verbose]
|
||||
print "Fetching closed issues...\r"
|
||||
end
|
||||
|
||||
response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil
|
||||
|
||||
issues = []
|
||||
|
||||
begin
|
||||
response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil
|
||||
page_i = 0
|
||||
count_pages = response.count_pages
|
||||
response.each_page do |page|
|
||||
@@ -569,6 +597,11 @@ module GitHubChangelogGenerator
|
||||
print "Fetching issues... #{page_i}/#{count_pages * PER_PAGE_NUMBER}\r"
|
||||
issues.concat(page)
|
||||
end
|
||||
rescue
|
||||
puts "Warning: GitHub API rate limit exceed (5000 per hour), change log may not contain some issues.".yellow
|
||||
end
|
||||
|
||||
|
||||
|
||||
print " \r"
|
||||
|
||||
@@ -610,7 +643,11 @@ module GitHubChangelogGenerator
|
||||
issues.each_slice(max_thread_number) { |issues_slice|
|
||||
issues_slice.each { |issue|
|
||||
threads << Thread.new {
|
||||
begin
|
||||
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
|
||||
print "Fetching events for issues and PR: #{i+1}/#{@issues.count + @pull_requests.count}\r"
|
||||
i +=1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module GitHubChangelogGenerator
|
||||
VERSION = '1.3.10'
|
||||
VERSION = '1.3.11'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user