From 1f68ef8bad451bb7df516700acedf1f158c4564f Mon Sep 17 00:00:00 2001 From: Umberto Nicoletti Date: Sat, 30 Sep 2017 20:45:31 +0200 Subject: [PATCH] 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 --- .../generator/generator_generation.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/github_changelog_generator/generator/generator_generation.rb b/lib/github_changelog_generator/generator/generator_generation.rb index 7351eb7..4b06aa9 100644 --- a/lib/github_changelog_generator/generator/generator_generation.rb +++ b/lib/github_changelog_generator/generator/generator_generation.rb @@ -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"]