Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gems
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-28 12:13:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-28 12:13:18 +0300
commit38b2e0d403a2f879ca714ebde61d0611305fbd99 (patch)
tree47967ed7efce26528cfa7b3774b25d0f34262103 /gems
parent3daa769462fb1ac2b3257604dc5551c181d408c9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'gems')
-rw-r--r--gems/gitlab-housekeeper/Gemfile.lock1
-rw-r--r--gems/gitlab-housekeeper/gitlab-housekeeper.gemspec3
-rw-r--r--gems/gitlab-housekeeper/lib/gitlab/housekeeper/gitlab_client.rb7
-rw-r--r--gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb5
-rw-r--r--gems/gitlab-housekeeper/spec/gitlab/housekeeper/gitlab_client_spec.rb5
5 files changed, 17 insertions, 4 deletions
diff --git a/gems/gitlab-housekeeper/Gemfile.lock b/gems/gitlab-housekeeper/Gemfile.lock
index 8da2b8cd8c9..9fbdc246811 100644
--- a/gems/gitlab-housekeeper/Gemfile.lock
+++ b/gems/gitlab-housekeeper/Gemfile.lock
@@ -10,6 +10,7 @@ PATH
remote: .
specs:
gitlab-housekeeper (0.1.0)
+ activesupport
httparty
rubocop
diff --git a/gems/gitlab-housekeeper/gitlab-housekeeper.gemspec b/gems/gitlab-housekeeper/gitlab-housekeeper.gemspec
index 798ca5dcfe6..4083b3c2d11 100644
--- a/gems/gitlab-housekeeper/gitlab-housekeeper.gemspec
+++ b/gems/gitlab-housekeeper/gitlab-housekeeper.gemspec
@@ -19,11 +19,12 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.executables = ['gitlab-housekeeper']
+ spec.add_runtime_dependency 'activesupport'
spec.add_runtime_dependency 'httparty'
spec.add_runtime_dependency 'rubocop'
spec.add_development_dependency 'gitlab-styles'
spec.add_development_dependency 'rspec-rails'
- spec.add_development_dependency "rubocop-rspec"
+ spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'webmock'
end
diff --git a/gems/gitlab-housekeeper/lib/gitlab/housekeeper/gitlab_client.rb b/gems/gitlab-housekeeper/lib/gitlab/housekeeper/gitlab_client.rb
index 306fb56367d..5742b4e2456 100644
--- a/gems/gitlab-housekeeper/lib/gitlab/housekeeper/gitlab_client.rb
+++ b/gems/gitlab-housekeeper/lib/gitlab/housekeeper/gitlab_client.rb
@@ -109,7 +109,12 @@ module Gitlab
def current_user_id
@current_user_id = begin
- response = HTTParty.get("#{@base_uri}/user")
+ response = HTTParty.get(
+ "#{@base_uri}/user",
+ headers: {
+ "Private-Token" => @token
+ }
+ )
unless (200..299).cover?(response.code)
raise Error,
diff --git a/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb b/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb
index ad43ec014f5..78f27458bec 100644
--- a/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb
+++ b/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb
@@ -1,8 +1,9 @@
# frozen_string_literal: true
+require 'active_support/core_ext/string'
require 'gitlab/housekeeper/keep'
-require "gitlab/housekeeper/gitlab_client"
-require "gitlab/housekeeper/git"
+require 'gitlab/housekeeper/gitlab_client'
+require 'gitlab/housekeeper/git'
require 'digest'
module Gitlab
diff --git a/gems/gitlab-housekeeper/spec/gitlab/housekeeper/gitlab_client_spec.rb b/gems/gitlab-housekeeper/spec/gitlab/housekeeper/gitlab_client_spec.rb
index c105ecf030b..be9e6b9d230 100644
--- a/gems/gitlab-housekeeper/spec/gitlab/housekeeper/gitlab_client_spec.rb
+++ b/gems/gitlab-housekeeper/spec/gitlab/housekeeper/gitlab_client_spec.rb
@@ -75,6 +75,11 @@ RSpec.describe ::Gitlab::Housekeeper::GitlabClient do
before do
# Get the current housekeeper user
stub_request(:get, "https://gitlab.com/api/v4/user")
+ .with(
+ headers: {
+ 'Private-Token' => 'the-api-token'
+ }
+ )
.to_return(status: 200, body: { id: housekeeper_user_id }.to_json)
# Get the id of the current merge request