Skip to content

Revert "More concurrency" #934

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

Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion github_changelog_generator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_runtime_dependency("activesupport")
spec.add_runtime_dependency("async", ">= 1.25.0")
spec.add_runtime_dependency("async-http-faraday")
spec.add_runtime_dependency("faraday-http-cache")
spec.add_runtime_dependency("multi_json")
Expand Down
27 changes: 12 additions & 15 deletions lib/github_changelog_generator/generator/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,18 @@ def initialize(options = {})
# @return [String] Generated changelog file
def compound_changelog
@options.load_custom_ruby_files

Sync do
fetch_and_filter_tags
fetch_issues_and_pr

log = if @options[:unreleased_only]
generate_entry_between_tags(@filtered_tags[0], nil)
else
generate_entries_for_all_tags
end
log += File.read(@options[:base]) if File.file?(@options[:base])
log = remove_old_fixed_string(log)
log = insert_fixed_string(log)
@log = log
end
fetch_and_filter_tags
fetch_issues_and_pr

log = if @options[:unreleased_only]
generate_entry_between_tags(@filtered_tags[0], nil)
else
generate_entries_for_all_tags
end
log += File.read(@options[:base]) if File.file?(@options[:base])
log = remove_old_fixed_string(log)
log = insert_fixed_string(log)
@log = log
end

private
Expand Down
5 changes: 5 additions & 0 deletions lib/github_changelog_generator/octo_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def fetch_events_async(issues)

# to clear line from prev print
print_empty_line

client.agent.close
end

Helper.log.info "Fetching events for issues and PR: #{i}"
Expand Down Expand Up @@ -254,6 +256,8 @@ def fetch_comments_async(prs)
end

barrier.wait

client.agent.close
end

nil
Expand Down Expand Up @@ -313,6 +317,7 @@ def commits
end

barrier.wait
client.agent.close

@commits.sort! do |b, a|
a[:commit][:author][:date] <=> b[:commit][:author][:date]
Expand Down