diff options
author | Rubén Dávila <ruben@gitlab.com> | 2018-03-07 18:58:50 +0300 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2018-03-07 18:58:50 +0300 |
commit | d179f002d9a51ba3e082b5ae5943c0f31c694e4e (patch) | |
tree | 11c05d15a2a61603e95d1e30ef01bdbf038d5729 /lib/gitlab/legacy_github_import/project_creator.rb | |
parent | 42725ea96c7c2804d8a08130de529aceb87129d1 (diff) |
CE backport for creating CI/CD projects from GitHub
Diffstat (limited to 'lib/gitlab/legacy_github_import/project_creator.rb')
-rw-r--r-- | lib/gitlab/legacy_github_import/project_creator.rb | 9 |
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 |