diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-05 18:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-05 18:07:51 +0000 |
commit | 6a7cc8c14727f6fac64a5be6838764d8d5d41468 (patch) | |
tree | 97c8a3c2f180d26f0f8f0baaa3230352b8ef1efb /app/models | |
parent | 872319738757edc0483346c75a2407f7019b963f (diff) | |
download | gitlab-ce-6a7cc8c14727f6fac64a5be6838764d8d5d41468.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/pipeline.rb | 6 | ||||
-rw-r--r-- | app/models/ci/pipeline_enums.rb | 13 | ||||
-rw-r--r-- | app/models/project_wiki.rb | 2 |
3 files changed, 14 insertions, 7 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 5821cc1a1a5..c3292d7524e 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -204,7 +204,7 @@ module Ci end scope :internal, -> { where(source: internal_sources) } - scope :ci_sources, -> { where(config_source: ci_sources_values) } + scope :ci_sources, -> { where(config_source: ::Ci::PipelineEnums.ci_config_sources_values) } scope :for_user, -> (user) { where(user: user) } scope :for_sha, -> (sha) { where(sha: sha) } scope :for_source_sha, -> (source_sha) { where(source_sha: source_sha) } @@ -315,10 +315,6 @@ module Ci sources.reject { |source| source == "external" }.values end - def self.ci_sources_values - config_sources.values_at(:repository_source, :auto_devops_source, :unknown_source) - end - def self.bridgeable_statuses ::Ci::Pipeline::AVAILABLE_STATUSES - %w[created preparing pending] end diff --git a/app/models/ci/pipeline_enums.rb b/app/models/ci/pipeline_enums.rb index 859abc4a0d5..ac930f63abf 100644 --- a/app/models/ci/pipeline_enums.rb +++ b/app/models/ci/pipeline_enums.rb @@ -35,9 +35,20 @@ module Ci { unknown_source: nil, repository_source: 1, - auto_devops_source: 2 + auto_devops_source: 2, + remote_source: 4, + external_project_source: 5 } end + + def self.ci_config_sources_values + config_sources.values_at( + :unknown_source, + :repository_source, + :auto_devops_source, + :remote_source, + :external_project_source) + end end end diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index f02ccd9e55e..48c96203921 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -58,7 +58,7 @@ class ProjectWiki end def wiki_base_path - [Gitlab.config.gitlab.relative_url_root, '/', @project.full_path, '/wikis'].join('') + [Gitlab.config.gitlab.relative_url_root, '/', @project.full_path, '/-', '/wikis'].join('') end # Returns the Gitlab::Git::Wiki object. |