Merge branch 'hotfix/update-changelog' into develop
This commit is contained in:
commit
6d02c509cd
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,8 +1,7 @@
|
|||
# Change Log
|
||||
|
||||
## [Unreleased](https://github.com/skywinder/github-changelog-generator/tree/HEAD)
|
||||
|
||||
[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.9.0...HEAD)
|
||||
## [1.10.0](https://github.com/skywinder/github-changelog-generator/tree/1.10.0) (2016-01-05)
|
||||
[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.9.0...1.10.0)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
|
@ -10,9 +9,14 @@
|
|||
- Introduce ParserError exception class [\#296](https://github.com/skywinder/github-changelog-generator/pull/296) ([olleolleolle](https://github.com/olleolleolle))
|
||||
- ParserFile: support values with equals signs [\#285](https://github.com/skywinder/github-changelog-generator/pull/285) ([olleolleolle](https://github.com/olleolleolle))
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- PRs not closed on master branch show up in changelog [\#280](https://github.com/skywinder/github-changelog-generator/issues/280)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Update bundler [\#306](https://github.com/skywinder/github-changelog-generator/pull/306) ([SteveGilvarry](https://github.com/SteveGilvarry))
|
||||
- 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))
|
||||
- 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))
|
||||
- Git ignore coverage/ [\#300](https://github.com/skywinder/github-changelog-generator/pull/300) ([olleolleolle](https://github.com/olleolleolle))
|
||||
- \[refactor\] Fix docblock datatype, use \#map [\#299](https://github.com/skywinder/github-changelog-generator/pull/299) ([olleolleolle](https://github.com/olleolleolle))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
github_changelog_generator (1.9.0)
|
||||
github_changelog_generator (1.10.0)
|
||||
colorize (~> 0.7)
|
||||
github_api (~> 0.12)
|
||||
|
||||
|
@ -48,7 +48,7 @@ GEM
|
|||
multi_xml (0.5.5)
|
||||
multipart-post (2.0.0)
|
||||
netrc (0.10.3)
|
||||
nokogiri (1.6.6.2)
|
||||
nokogiri (1.6.6.4)
|
||||
mini_portile (~> 0.6.0)
|
||||
oauth2 (1.0.0)
|
||||
faraday (>= 0.8, < 0.10)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Merged PR to Develop [\#19](https://github.com/skywinder/changelog_test/pull/19) ([skywinder](https://github.com/skywinder))
|
||||
- Merged br \(should appear in change log also\) [\#21](https://github.com/skywinder/changelog_test/pull/21) ([skywinder](https://github.com/skywinder))
|
||||
- This a PR with a lot of comments and events [\#17](https://github.com/skywinder/changelog_test/pull/17) ([skywinder](https://github.com/skywinder))
|
||||
- This PR closes 14 from commit [\#15](https://github.com/skywinder/changelog_test/pull/15) ([skywinder](https://github.com/skywinder))
|
||||
- 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
|
|||
@user = @options[:user]
|
||||
@project = @options[:project]
|
||||
@github_token = fetch_github_token
|
||||
github_options = { per_page: PER_PAGE_NUMBER }
|
||||
github_options[:oauth_token] = @github_token unless @github_token.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 = { per_page: PER_PAGE_NUMBER }
|
||||
@github_options[:oauth_token] = @github_token unless @github_token.nil?
|
||||
@github_options[:endpoint] = @options[:github_endpoint] unless @options[:github_endpoint].nil?
|
||||
@github_options[:site] = @options[:github_endpoint] unless @options[:github_site].nil?
|
||||
|
||||
@github = check_github_response { Github.new github_options }
|
||||
@github = check_github_response { Github.new @github_options }
|
||||
end
|
||||
|
||||
# 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
|
|||
def fetch_closed_pull_requests
|
||||
pull_requests = []
|
||||
begin
|
||||
response = @github.pull_requests.list @options[:user], @options[:project], state: "closed"
|
||||
if @options[:release_branch].nil?
|
||||
response = @github.pull_requests.list @options[:user],
|
||||
@options[:project],
|
||||
state: "closed"
|
||||
else
|
||||
response = @github.pull_requests.list @options[:user],
|
||||
@options[:project],
|
||||
state: "closed",
|
||||
base: @options[:release_branch]
|
||||
end
|
||||
page_i = 0
|
||||
count_pages = response.count_pages
|
||||
response.each_page do |page|
|
||||
|
|
|
@ -178,9 +178,11 @@ module GitHubChangelogGenerator
|
|||
fetched_pr = closed_pull_requests.find do |fpr|
|
||||
fpr.number == pr.number
|
||||
end
|
||||
if fetched_pr
|
||||
pr[:merged_at] = fetched_pr[:merged_at]
|
||||
closed_pull_requests.delete(fetched_pr)
|
||||
end
|
||||
end
|
||||
|
||||
pull_requests.select! do |pr|
|
||||
!pr[:merged_at].nil?
|
||||
|
|
|
@ -143,6 +143,9 @@ module GitHubChangelogGenerator
|
|||
opts.on("--future-release [RELEASE-VERSION]", "Put the unreleased changes in the specified release number.") do |future_release|
|
||||
options[:future_release] = future_release
|
||||
end
|
||||
opts.on("--release-branch [RELEASE-BRANCH]", "Limit pull requests to the release branch, such as master or release") do |release_branch|
|
||||
options[:release_branch] = release_branch
|
||||
end
|
||||
opts.on("--[no-]verbose", "Run verbosely. Default is true") do |v|
|
||||
options[:verbose] = v
|
||||
end
|
||||
|
|
|
@ -16,7 +16,8 @@ module GitHubChangelogGenerator
|
|||
bug_labels enhancement_labels
|
||||
between_tags exclude_tags since_tag max_issues
|
||||
github_site github_endpoint simple_list
|
||||
future_release verbose release_url base )
|
||||
future_release release_branch verbose release_url
|
||||
base )
|
||||
|
||||
OPTIONS.each do |o|
|
||||
attr_accessor o.to_sym
|
||||
|
|
Loading…
Reference in New Issue
Block a user