diff options
author | Rémy Coutable <remy@rymai.me> | 2019-02-18 09:48:20 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-18 09:48:20 +0000 |
commit | 59b37aecf956812234250bc15d94002e6ea74014 (patch) | |
tree | aea3ebf7982f695c42401b8abccc91583dcaeab9 /lib | |
parent | e49ff61571f82863c1c464d8211d2e8d8adc50fb (diff) | |
parent | 2c15cf471d22e5aa69d47924e6bfb6d5eb083552 (diff) | |
download | gitlab-ce-59b37aecf956812234250bc15d94002e6ea74014.tar.gz |
Merge branch 'sh-include-project-path-for-internal-api' into 'master'
Include gl_project_path in API /internal/allowed response
See merge request gitlab-org/gitlab-ce!25314
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers/internal_helpers.rb | 8 | ||||
-rw-r--r-- | lib/api/internal.rb | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index 4eaaca96b49..fe78049af87 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -81,6 +81,14 @@ module API Gitlab::GlRepository.gl_repository(project, wiki?) end + def gl_project_path + if wiki? + project.wiki.full_path + else + project.full_path + end + end + # Return the repository depending on whether we want the wiki or the # regular repository def repository diff --git a/lib/api/internal.rb b/lib/api/internal.rb index b44ef2a6ea4..70b32f7d758 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -77,6 +77,7 @@ module API when ::Gitlab::GitAccessResult::Success payload = { gl_repository: gl_repository, + gl_project_path: gl_project_path, gl_id: Gitlab::GlId.gl_id(user), gl_username: user&.username, git_config_options: [], |