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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/import_github.rb')
-rw-r--r--lib/api/import_github.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb
index 6550808a563..ab7ac6624a8 100644
--- a/lib/api/import_github.rb
+++ b/lib/api/import_github.rb
@@ -20,7 +20,10 @@ module API
end
def access_params
- { github_access_token: params[:personal_access_token] }
+ {
+ github_access_token: params[:personal_access_token],
+ additional_access_tokens: params[:additional_access_tokens]
+ }
end
def client_options
@@ -59,6 +62,11 @@ module API
requires :target_namespace, type: String, allow_blank: false, desc: 'Namespace or group to import repository into'
optional :github_hostname, type: String, desc: 'Custom GitHub enterprise hostname'
optional :optional_stages, type: Hash, desc: 'Optional stages of import to be performed'
+ optional :additional_access_tokens,
+ type: Array[String],
+ coerce_with: ::API::Validations::Types::CommaSeparatedToArray.coerce,
+ desc: 'Additional list of personal access tokens',
+ documentation: { example: 'foo,bar' }
end
post 'import/github' do
result = Import::GithubService.new(client, current_user, params).execute(access_params, provider)