From 57f59f7b890dce7e3ee00d7c3d7b33fc9f0e5797 Mon Sep 17 00:00:00 2001 From: Stanislav Kolotinskiy Date: Fri, 4 Dec 2020 20:05:33 +0200 Subject: [PATCH] Remove gh usage --- Gemfile | 1 - Gemfile.lock | 16 ---------------- lib/travis/scheduler/record/request.rb | 1 - lib/travis/scheduler/serialize/worker.rb | 4 ++-- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 85cf95ea..b326345e 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,6 @@ gem 'travis-rollout', git: 'https://github.com/travis-ci/travis-rollout' gem 'travis-exceptions', git: 'https://github.com/travis-ci/travis-exceptions' gem 'travis-logger', git: 'https://github.com/travis-ci/travis-logger' gem 'travis-settings', git: 'https://github.com/travis-ci/travis-settings' -gem 'gh', git: 'https://github.com/travis-ci/gh' gem 'coder', git: 'https://github.com/rkh/coder' gem 'metriks', git: 'https://github.com/travis-ci/metriks' diff --git a/Gemfile.lock b/Gemfile.lock index 99e4b61e..a3b5b334 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,18 +4,6 @@ GIT specs: coder (0.4.0) -GIT - remote: https://github.com/travis-ci/gh - revision: 38fb339510ff9ae67cb08c6df7698f4c393f5a44 - specs: - gh (0.15.1) - addressable (~> 2.4) - backports - faraday (~> 0.8) - multi_json (~> 1.0) - net-http-persistent (~> 2.9) - net-http-pipeline - GIT remote: https://github.com/travis-ci/marginalia revision: 46bbe301640efb5ea81828cb7deeaf874516de78 @@ -102,7 +90,6 @@ GEM descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - backports (3.10.3) builder (3.2.3) bunny (2.9.2) amq-protocol (~> 2.3.0) @@ -151,8 +138,6 @@ GEM metaclass (~> 0.0.1) multi_json (1.12.1) multipart-post (2.1.1) - net-http-persistent (2.9.4) - net-http-pipeline (1.0.1) pg (0.21.0) pry (0.11.3) coderay (~> 1.1.0) @@ -223,7 +208,6 @@ DEPENDENCIES factory_girl (~> 4.7.0) faraday faraday_middleware - gh! libhoney marginalia! metriks! diff --git a/lib/travis/scheduler/record/request.rb b/lib/travis/scheduler/record/request.rb index e2f863b2..fc9c5cfd 100644 --- a/lib/travis/scheduler/record/request.rb +++ b/lib/travis/scheduler/record/request.rb @@ -2,7 +2,6 @@ require 'travis/scheduler/record/organization' require 'travis/scheduler/record/repository' require 'travis/scheduler/record/user' -require 'gh' class Request < ActiveRecord::Base belongs_to :commit diff --git a/lib/travis/scheduler/serialize/worker.rb b/lib/travis/scheduler/serialize/worker.rb index 1c20d6f0..dc87218a 100644 --- a/lib/travis/scheduler/serialize/worker.rb +++ b/lib/travis/scheduler/serialize/worker.rb @@ -84,7 +84,7 @@ def job_data def repository_data compact( id: repo.id, - github_id: repo.github_id, + github_id: repo.vcs_id.to_i, vcs_id: repo.vcs_id, vcs_type: repo.vcs_type, url: repo.url, @@ -179,7 +179,7 @@ def allowed_repositories @allowed_repositories ||= begin repository_ids = Repository.where(owner_id: build.owner_id, active: true).select{ |repo| repo.settings.allow_config_imports }.map(&:vcs_id) repository_ids << repo.vcs_id - repository_ids.uniq.sort + repository_ids.uniq.sort end end end