From 1a8691ad2feee931546f9b7a6a319263c1ac70e3 Mon Sep 17 00:00:00 2001 From: Wedge Date: Sun, 15 Nov 2020 03:07:03 +0300 Subject: [PATCH] Use access tokens --- config/initializers/github.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/initializers/github.rb b/config/initializers/github.rb index 0a4b18ba3..f7fff2484 100644 --- a/config/initializers/github.rb +++ b/config/initializers/github.rb @@ -1,14 +1,13 @@ #configuration of Github api gem -Github_blobs_api = Octokit::Client.new(login: ENV['GITHUB_REPO_BOT_LOGIN'], password: ENV['GITHUB_REPO_BOT_PASSWORD']) +Github_blobs_api = Octokit::Client.new(access_token: ENV["GITHUB_REPO_BOT_ACCESS_TOKEN"]) Octokit.configure do |c| - c.login = ENV["GITHUB_LOGIN"] - c.password = ENV["GITHUB_PASSWORD"] + c.access_token = ENV["GITHUB_ACCESS_TOKEN"] end Octokit.middleware = Faraday::RackBuilder.new do |builder| store = ActiveSupport::Cache.lookup_store(:redis_store, ENV['REDIS_URL'].to_s + '/1') builder.use Faraday::HttpCache, store: store, shared_cache: false, serializer: Marshal builder.use Octokit::Response::RaiseError builder.adapter Faraday.default_adapter -end \ No newline at end of file +end