From 2b5f61501621a4772ff1095d6adb40464e6882a5 Mon Sep 17 00:00:00 2001 From: Cormac Relf Date: Tue, 6 Apr 2021 21:58:37 +1000 Subject: [PATCH 1/2] fix ruby 3.0 kwargs --- lib/github_changelog_generator/octo_fetcher.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/github_changelog_generator/octo_fetcher.rb b/lib/github_changelog_generator/octo_fetcher.rb index 641245154..0e7577080 100644 --- a/lib/github_changelog_generator/octo_fetcher.rb +++ b/lib/github_changelog_generator/octo_fetcher.rb @@ -159,9 +159,9 @@ def fetch_closed_issues_and_pr print "Fetching closed issues...\r" if @options[:verbose] issues = [] page_i = 0 - count_pages = calculate_pages(client, "issues", closed_pr_options) + count_pages = calculate_pages(client, "issues", **closed_pr_options) - iterate_pages(client, "issues", closed_pr_options) do |new_issues| + iterate_pages(client, "issues", **closed_pr_options) do |new_issues| page_i += PER_PAGE_NUMBER print_in_same_line("Fetching issues... #{page_i}/#{count_pages * PER_PAGE_NUMBER}") issues.concat(new_issues) @@ -185,7 +185,7 @@ def fetch_closed_pull_requests page_i = 0 count_pages = calculate_pages(client, "pull_requests", options) - iterate_pages(client, "pull_requests", options) do |new_pr| + iterate_pages(client, "pull_requests", **options) do |new_pr| page_i += PER_PAGE_NUMBER log_string = "Fetching merged dates... #{page_i}/#{count_pages * PER_PAGE_NUMBER}" print_in_same_line(log_string) @@ -215,7 +215,7 @@ def fetch_events_async(issues) issues.each do |issue| semaphore.async do issue["events"] = [] - iterate_pages(client, "issue_events", issue["number"], preview) do |new_event| + iterate_pages(client, "issue_events", issue["number"], **preview) do |new_event| issue["events"].concat(new_event) end issue["events"] = issue["events"].map { |event| stringify_keys_deep(event.to_hash) } From 95df1f367c7a5672e4cfbd32ef3fe54a4d676126 Mon Sep 17 00:00:00 2001 From: Cormac Relf Date: Tue, 6 Apr 2021 22:03:51 +1000 Subject: [PATCH 2/2] add ruby 3.0 to CircleCI matrix --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f16f92a8..dd01b77cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,14 +4,14 @@ # version: 2.1 orbs: - ruby: circleci/ruby@0.2.2 + ruby: circleci/ruby@1.0 shared_steps: &shared_steps steps: - run: ruby -v - checkout - ruby/load-cache - - run: gem install bundler:2.1.4 + - run: gem install bundler:2.2.15 - ruby/install-deps - ruby/save-cache - ruby/run-tests @@ -59,6 +59,6 @@ workflows: - test: matrix: parameters: - tag: ["2.5", "2.6", "2.7"] + tag: ["2.5", "2.6", "2.7", "3.0"] requires: - lint