diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-09 15:09:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-09 15:09:10 +0000 |
commit | 9ea69b43c3502c4c63e6d47da40786875197fcf3 (patch) | |
tree | 34a74f05ff8321a9dc16bb22dd3d3fe6ef55d3e7 /app/helpers/ci | |
parent | 45c999c8bcab0cd8ea766919634580465e5080d9 (diff) | |
download | gitlab-ce-9ea69b43c3502c4c63e6d47da40786875197fcf3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/ci')
-rw-r--r-- | app/helpers/ci/pipeline_editor_helper.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/ci/pipeline_editor_helper.rb b/app/helpers/ci/pipeline_editor_helper.rb index a71b0f4a83a..ceb18d90c92 100644 --- a/app/helpers/ci/pipeline_editor_helper.rb +++ b/app/helpers/ci/pipeline_editor_helper.rb @@ -7,5 +7,23 @@ module Ci def can_view_pipeline_editor?(project) can_collaborate_with_project?(project) end + + def js_pipeline_editor_data(project) + { + "ci-config-path": project.ci_config_path_or_default, + "commit-sha" => project.commit ? project.commit.sha : '', + "default-branch" => project.default_branch, + "empty-state-illustration-path" => image_path('illustrations/empty-state/empty-dag-md.svg'), + "initial-branch-name": params[:branch_name], + "lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'), + "new-merge-request-path" => namespace_project_new_merge_request_path, + "project-path" => project.path, + "project-full-path" => project.full_path, + "project-namespace" => project.namespace.full_path, + "yml-help-page-path" => help_page_path('ci/yaml/README') + } + end end end + +Ci::PipelineEditorHelper.prepend_if_ee('EE::Ci::PipelineEditorHelper') |