lib/danger/commands/local.rb in danger-6.3.2 vs lib/danger/commands/local.rb in danger-7.0.0
- old
+ new
@@ -64,15 +64,18 @@
end
end
private
+ # this method is a duplicate of Commands::PR#configure_octokit
+ # - worth a refactor sometime?
def configure_octokit(cache_dir)
# setup caching for Github calls to hitting the API rate limit too quickly
cache_file = File.join(cache_dir, "danger_local_cache")
cache = HTTPCache.new(cache_file, clear_cache: @clear_http_cache)
Octokit.middleware = Faraday::RackBuilder.new do |builder|
builder.use Faraday::HttpCache, store: cache, serializer: Marshal, shared_cache: false
+ builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::RaiseError
builder.adapter Faraday.default_adapter
end
end
end