Use closed_at and merged_at when filtering issues/prs (#504)

* use closed_at and merged_at when filtering issues/prs
* document use of closed_at and merged_at
This commit is contained in:
Umberto Nicoletti 2017-09-30 20:45:31 +02:00 committed by Olle Jonsson
parent efa960ce1c
commit 1f68ef8bad

View File

@ -93,12 +93,13 @@ module GitHubChangelogGenerator
create_log_for_tag(filtered_pull_requests, filtered_issues, newer_tag, older_tag)
end
# Apply all filters to issues and pull requests
# Filters issues and pull requests based on, respectively, `closed_at` and `merged_at`
# timestamp fields.
#
# @return [Array] filtered issues and pull requests
def filter_issues_for_tags(newer_tag, older_tag)
filtered_pull_requests = delete_by_time(@pull_requests, "actual_date", older_tag, newer_tag)
filtered_issues = delete_by_time(@issues, "actual_date", older_tag, newer_tag)
filtered_pull_requests = delete_by_time(@pull_requests, "merged_at", older_tag, newer_tag)
filtered_issues = delete_by_time(@issues, "closed_at", older_tag, newer_tag)
newer_tag_name = newer_tag.nil? ? nil : newer_tag["name"]