summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-08-16 10:10:24 +0000
committerRémy Coutable <remy@rymai.me>2017-08-16 10:10:24 +0000
commit1b46a8360e0adffba79fad5730e94e333350f063 (patch)
tree73db4cf8ef38d8b99c345264901c44744e8a9806 /app/models/project.rb
parent765b1831687aac0a70819793890ac0e1ca5ae63f (diff)
parente99444bb2d3a249461825550fc6271f4e0ee8874 (diff)
downloadgitlab-ce-1b46a8360e0adffba79fad5730e94e333350f063.tar.gz
Merge branch '34643-fix-project-path-slugify' into 'master'
Fix CI_PROJECT_PATH_SLUG slugify Closes #34643 See merge request !13350
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 0de7da0ddaa..0d15d644413 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1282,12 +1282,16 @@ class Project < ActiveRecord::Base
status.zero?
end
+ def full_path_slug
+ Gitlab::Utils.slugify(full_path.to_s)
+ end
+
def predefined_variables
[
{ key: 'CI_PROJECT_ID', value: id.to_s, public: true },
{ key: 'CI_PROJECT_NAME', value: path, public: true },
{ key: 'CI_PROJECT_PATH', value: full_path, public: true },
- { key: 'CI_PROJECT_PATH_SLUG', value: full_path.parameterize, public: true },
+ { key: 'CI_PROJECT_PATH_SLUG', value: full_path_slug, public: true },
{ key: 'CI_PROJECT_NAMESPACE', value: namespace.full_path, public: true },
{ key: 'CI_PROJECT_URL', value: web_url, public: true }
]