Skip to content

Sort issues by detected actual_date instead of closed_at #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/github_changelog_generator/generator/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ def generate_entry_between_tags(older_tag, newer_tag)
Entry.new(options).generate_entry_for_tag(filtered_pull_requests, filtered_issues, newer_tag_name, newer_tag_link, newer_tag_time, older_tag_name)
end

# Filters issues and pull requests based on, respectively, `closed_at` and `merged_at`
# timestamp fields.
# Filters issues and pull requests based on, respectively, `actual_date`
# and `merged_at` timestamp fields. `actual_date` is the detected form of
# `closed_at` based on merge event SHA commit times.
#
# @return [Array] filtered issues and pull requests
def filter_issues_for_tags(newer_tag, older_tag)
filtered_pull_requests = filter_by_tag(@pull_requests, newer_tag)
filtered_issues = delete_by_time(@issues, "closed_at", older_tag, newer_tag)
filtered_issues = delete_by_time(@issues, "actual_date", older_tag, newer_tag)

newer_tag_name = newer_tag.nil? ? nil : newer_tag["name"]

Expand Down