diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-16 10:10:24 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-16 10:10:24 +0000 |
commit | 1b46a8360e0adffba79fad5730e94e333350f063 (patch) | |
tree | 73db4cf8ef38d8b99c345264901c44744e8a9806 /app/models/project.rb | |
parent | 765b1831687aac0a70819793890ac0e1ca5ae63f (diff) | |
parent | e99444bb2d3a249461825550fc6271f4e0ee8874 (diff) | |
download | gitlab-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.rb | 6 |
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 } ] |