summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-05-31 15:53:04 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-05-31 15:53:04 +0000
commitd7b277df46ffa3723a16159878958f9a825315e6 (patch)
tree89dac0eeecb620386d36c71fca7d9e4ea33ae3da /app
parent5cd0e721f78310bc2bb810d17451f046270148d9 (diff)
parentbd4a3b6ebfbca9663f47940ea01b8304d68e4e38 (diff)
downloadgitlab-ce-d7b277df46ffa3723a16159878958f9a825315e6.tar.gz
Merge branch 'dz-scope-project-routes-3' into 'master'
Move some project routes under - scope See merge request gitlab-org/gitlab-ce!28830
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/api.js2
-rw-r--r--app/models/concerns/referable.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js
index e583a8affd4..7cebb88f3a4 100644
--- a/app/assets/javascripts/api.js
+++ b/app/assets/javascripts/api.js
@@ -12,7 +12,7 @@ const Api = {
groupProjectsPath: '/api/:version/groups/:id/projects.json',
projectsPath: '/api/:version/projects.json',
projectPath: '/api/:version/projects/:id',
- projectLabelsPath: '/:namespace_path/:project_path/labels',
+ projectLabelsPath: '/:namespace_path/:project_path/-/labels',
projectMergeRequestsPath: '/api/:version/projects/:id/merge_requests',
projectMergeRequestPath: '/api/:version/projects/:id/merge_requests/:mrid',
projectMergeRequestChangesPath: '/api/:version/projects/:id/merge_requests/:mrid/changes',
diff --git a/app/models/concerns/referable.rb b/app/models/concerns/referable.rb
index 58143a32fdc..4a506146de3 100644
--- a/app/models/concerns/referable.rb
+++ b/app/models/concerns/referable.rb
@@ -73,6 +73,7 @@ module Referable
(?<url>
#{Regexp.escape(Gitlab.config.gitlab.url)}
\/#{Project.reference_pattern}
+ (?:\/\-)?
\/#{Regexp.escape(route)}
\/#{pattern}
(?<path>