diff options
Diffstat (limited to 'app/presenters/project_presenter.rb')
-rw-r--r-- | app/presenters/project_presenter.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 71cbe28de25..aad1c816cf1 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -93,10 +93,6 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated filename_path(repository.license_blob&.name) end - def ci_configuration_path - filename_path(repository.gitlab_ci_yml&.name) - end - def contribution_guide_path if project && contribution_guide = repository.contribution_guide project_blob_path( @@ -131,10 +127,6 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ide_edit_path(project, default_branch_or_master, 'CONTRIBUTING.md') end - def add_ci_yml_path - add_special_file_path(file_name: ci_config_path_or_default) - end - def add_readme_path add_special_file_path(file_name: 'README.md') end @@ -143,6 +135,10 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ide_edit_path(project, default_branch_or_master, 'README.md') end + def add_ci_yml_path + add_special_file_path(file_name: ci_config_path_or_default) + end + def license_short_name license = repository.license license&.nickname || license&.name || 'LICENSE' @@ -384,11 +380,11 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated if cicd_missing? AnchorData.new(false, statistic_icon + _('Set up CI/CD'), - add_ci_yml_path) + project_ci_pipeline_editor_path(project)) elsif repository.gitlab_ci_yml.present? AnchorData.new(false, statistic_icon('doc-text') + _('CI/CD configuration'), - ci_configuration_path, + project_ci_pipeline_editor_path(project), 'btn-default') end end |