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 'app/helpers/ci/pipelines_helper.rb')
-rw-r--r--app/helpers/ci/pipelines_helper.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/helpers/ci/pipelines_helper.rb b/app/helpers/ci/pipelines_helper.rb
index 9c4ceaccff1..156df0c4cc4 100644
--- a/app/helpers/ci/pipelines_helper.rb
+++ b/app/helpers/ci/pipelines_helper.rb
@@ -87,7 +87,8 @@ module Ci
pipeline_editor_path: can?(current_user, :create_pipeline, project) && project_ci_pipeline_editor_path(project),
suggested_ci_templates: suggested_ci_templates.to_json,
full_path: project.full_path,
- visibility_pipeline_id_type: visibility_pipeline_id_type
+ visibility_pipeline_id_type: visibility_pipeline_id_type,
+ show_jenkins_ci_prompt: show_jenkins_ci_prompt(project).to_s
}
end
@@ -104,5 +105,12 @@ module Ci
yield markdown(warning.content)
end
end
+
+ def show_jenkins_ci_prompt(project)
+ return false unless can?(current_user, :create_pipeline, project)
+ return false if project.repository.gitlab_ci_yml.present?
+
+ project.repository.jenkinsfile?
+ end
end
end