Commit c7c2b9ec authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'kassio/fix-import-export-karg-warnings' into 'master'

Fix lib/gitlab/import_export/* kwargs warnings

See merge request gitlab-org/gitlab!44772
parents c3ac137b c5e4ed33
......@@ -20,8 +20,8 @@ module Gitlab
/\Aremote_\w+_(url|urls|request_header)\Z/ # carrierwave automatically creates these attribute methods for uploads
).freeze
def self.clean(*args)
new(*args).clean
def self.clean(*args, **kwargs)
new(*args, **kwargs).clean
end
def initialize(relation_hash:, relation_class:, excluded_keys: [])
......
......@@ -31,8 +31,8 @@ module Gitlab
TOKEN_RESET_MODELS = %i[Project Namespace Group Ci::Trigger Ci::Build Ci::Runner ProjectHook].freeze
def self.create(*args)
new(*args).create
def self.create(*args, **kwargs)
new(*args, **kwargs).create
end
def self.relation_class(relation_name)
......
......@@ -10,8 +10,8 @@ module Gitlab
MAX_RETRIES = 8
IGNORED_FILENAMES = %w(. ..).freeze
def self.import(*args)
new(*args).import
def self.import(*args, **kwargs)
new(*args, **kwargs).import
end
def initialize(importable:, archive_file:, shared:)
......
......@@ -36,7 +36,7 @@ module Gitlab
end
def exportable
@project.present(exportable_params)
@project.present(**exportable_params)
end
def exportable_params
......
......@@ -5,8 +5,8 @@ module Gitlab
class Saver
include Gitlab::ImportExport::CommandLineUtil
def self.save(*args)
new(*args).save
def self.save(*args, **kwargs)
new(*args, **kwargs).save
end
def initialize(exportable:, shared:)
......
......@@ -40,7 +40,7 @@ module Gitlab
def add_upload(upload)
uploader_context = FileUploader.extract_dynamic_path(upload).named_captures.symbolize_keys
UploadService.new(@project, File.open(upload, 'r'), FileUploader, uploader_context).execute.to_h
UploadService.new(@project, File.open(upload, 'r'), FileUploader, **uploader_context).execute.to_h
end
def copy_project_uploads
......
......@@ -3,8 +3,8 @@
module Gitlab
module ImportExport
class VersionChecker
def self.check!(*args)
new(*args).check!
def self.check!(*args, **kwargs)
new(*args, **kwargs).check!
end
def initialize(shared:)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment