Backport BE changes from CI/CD projects ee!4567

See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4567
This commit is contained in:
Eric Eastwood 2018-03-01 18:24:25 -06:00
parent c9660b45b1
commit 8ae57909a1
1 changed files with 6 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class ProjectsController < Projects::ApplicationController
cookies[:issue_board_welcome_hidden] = { path: project_path(@project), value: nil, expires: Time.at(0) }
redirect_to(
project_path(@project),
project_path(@project, custom_import_params),
notice: _("Project '%{project_name}' was successfully created.") % { project_name: @project.name }
)
else
@ -103,7 +103,7 @@ class ProjectsController < Projects::ApplicationController
def show
if @project.import_in_progress?
redirect_to project_import_path(@project)
redirect_to project_import_path(@project, custom_import_params)
return
end
@ -359,6 +359,10 @@ class ProjectsController < Projects::ApplicationController
]
end
def custom_import_params
{}
end
def repo_exists?
project.repository_exists? && !project.empty_repo?