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/lib
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2018-03-07 18:58:50 +0300
committerRubén Dávila <ruben@gitlab.com>2018-03-07 18:58:50 +0300
commitd179f002d9a51ba3e082b5ae5943c0f31c694e4e (patch)
tree11c05d15a2a61603e95d1e30ef01bdbf038d5729 /lib
parent42725ea96c7c2804d8a08130de529aceb87129d1 (diff)
CE backport for creating CI/CD projects from GitHub
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/legacy_github_import/project_creator.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gitlab/legacy_github_import/project_creator.rb b/lib/gitlab/legacy_github_import/project_creator.rb
index cbabe5454ca..3ce245a8050 100644
--- a/lib/gitlab/legacy_github_import/project_creator.rb
+++ b/lib/gitlab/legacy_github_import/project_creator.rb
@@ -12,9 +12,8 @@ module Gitlab
@type = type
end
- def execute
- ::Projects::CreateService.new(
- current_user,
+ def execute(extra_attrs = {})
+ attrs = {
name: name,
path: name,
description: repo.description,
@@ -24,7 +23,9 @@ module Gitlab
import_source: repo.full_name,
import_url: import_url,
skip_wiki: skip_wiki
- ).execute
+ }.merge!(extra_attrs)
+
+ ::Projects::CreateService.new(current_user, attrs).execute
end
private