Fix milesones support for unreleased issues. Fix #47
This commit is contained in:
parent
e6dc367f99
commit
a90c276a9f
|
@ -5,19 +5,15 @@
|
|||
|
||||
- *Merged pull-request:* Implement filtering of Pull Requests by milestones [\#50](https://github.com/skywinder/Github-Changelog-Generator/pull/50) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Feature/fix 37 [\#49](https://github.com/skywinder/Github-Changelog-Generator/pull/49) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Prettify output [\#48](https://github.com/skywinder/Github-Changelog-Generator/pull/48) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Implemented enhancement:* Add support for forked repo \(to extend changelog with parent's changes\) [\#21](https://github.com/skywinder/Github-Changelog-Generator/issues/21)
|
||||
|
||||
- *Fixed bug:* Sometimes user is NULL during merges [\#41](https://github.com/skywinder/Github-Changelog-Generator/issues/41)
|
||||
|
||||
## [1.2.8](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.8) (2015-02-17)
|
||||
[Full Changelog](https://github.com/skywinder/Github-Changelog-Generator/compare/1.2.7...1.2.8)
|
||||
|
||||
- *Merged pull-request:* Feature/fix 37 [\#49](https://github.com/skywinder/Github-Changelog-Generator/pull/49) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Merged pull-request:* Prettify output [\#48](https://github.com/skywinder/Github-Changelog-Generator/pull/48) ([skywinder](https://github.com/skywinder))
|
||||
|
||||
- *Closed issue:* Bugs, that closed simultaneously with push not appeared in correct version. [\#37](https://github.com/skywinder/Github-Changelog-Generator/issues/37)
|
||||
|
||||
## [1.2.7](https://github.com/skywinder/Github-Changelog-Generator/tree/1.2.7) (2015-01-26)
|
||||
|
|
|
@ -285,15 +285,13 @@ module GitHubChangelogGenerator
|
|||
filtered_pull_requests = delete_by_time(@pull_requests, :merged_at, older_tag, newer_tag)
|
||||
filtered_issues = delete_by_time(@issues, :actual_date, older_tag, newer_tag)
|
||||
|
||||
unless newer_tag.nil?
|
||||
newer_tag_name = newer_tag['name']
|
||||
newer_tag_name = newer_tag.nil? ? nil : newer_tag['name']
|
||||
|
||||
if @options[:filter_issues_by_milestone]
|
||||
#delete excess irrelevant issues (according milestones)
|
||||
filtered_issues = filter_by_milestone(filtered_issues, newer_tag_name, @issues)
|
||||
filtered_pull_requests = filter_by_milestone(filtered_pull_requests, newer_tag_name, @pull_requests)
|
||||
end
|
||||
end
|
||||
|
||||
older_tag_name = older_tag.nil? ? nil : older_tag['name']
|
||||
|
||||
|
@ -302,8 +300,6 @@ module GitHubChangelogGenerator
|
|||
end
|
||||
|
||||
def filter_by_milestone(filtered_issues, newer_tag_name, src_array)
|
||||
|
||||
|
||||
filtered_issues.select! { |issue|
|
||||
# leave issues without milestones
|
||||
if issue.milestone.nil?
|
||||
|
@ -313,7 +309,6 @@ module GitHubChangelogGenerator
|
|||
@all_tags.find { |tag| tag.name == issue.milestone.title }.nil?
|
||||
end
|
||||
}
|
||||
|
||||
unless newer_tag_name.nil?
|
||||
|
||||
#add missed issues (according milestones)
|
||||
|
@ -336,6 +331,7 @@ module GitHubChangelogGenerator
|
|||
|
||||
filtered_issues |= issues_to_add
|
||||
end
|
||||
filtered_issues
|
||||
end
|
||||
|
||||
def delete_by_time(array, hash_key, older_tag = nil, newer_tag = nil)
|
||||
|
|
Loading…
Reference in New Issue
Block a user