Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cc7ad7ac
Commit
cc7ad7ac
authored
Feb 18, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
7da4e9ae
431bbfa2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
1 deletion
+19
-1
changelogs/unreleased/sh-include-project-path-for-internal-api.yml
...s/unreleased/sh-include-project-path-for-internal-api.yml
+5
-0
doc/development/i18n/proofreader.md
doc/development/i18n/proofreader.md
+1
-1
lib/api/helpers/internal_helpers.rb
lib/api/helpers/internal_helpers.rb
+8
-0
lib/api/internal.rb
lib/api/internal.rb
+1
-0
spec/requests/api/internal_spec.rb
spec/requests/api/internal_spec.rb
+4
-0
No files found.
changelogs/unreleased/sh-include-project-path-for-internal-api.yml
0 → 100644
View file @
cc7ad7ac
---
title
:
Include gl_project_path in API /internal/allowed response
merge_request
:
25314
author
:
type
:
other
doc/development/i18n/proofreader.md
View file @
cc7ad7ac
...
...
@@ -85,7 +85,7 @@ are very appreciative of the work done by translators and proofreaders!
-
Spanish
-
Pedro Garcia -
[
GitLab
](
https://gitlab.com/pedgarrod
)
,
[
Crowdin
](
https://crowdin.com/profile/breaking_pitt
)
-
Turkish
-
Proofreaders needed.
-
Ali Demirtaş -
[
GitLab
](
https://gitlab.com/alidemirtas
)
,
[
Crowdin
](
https://crowdin.com/profile/alidemirtas
)
-
Ukrainian
-
Volodymyr Sobotovych -
[
GitLab
](
https://gitlab.com/wheleph
)
,
[
Crowdin
](
https://crowdin.com/profile/wheleph
)
-
Andrew Vityuk -
[
GitLab
](
https://gitlab.com/3_1_3_u
)
,
[
Crowdin
](
https://crowdin.com/profile/andruwa13
)
...
...
lib/api/helpers/internal_helpers.rb
View file @
cc7ad7ac
...
...
@@ -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
...
...
lib/api/internal.rb
View file @
cc7ad7ac
...
...
@@ -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:
[],
...
...
spec/requests/api/internal_spec.rb
View file @
cc7ad7ac
...
...
@@ -325,6 +325,7 @@ describe API::Internal do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_project_path"
]).
to
eq
(
project
.
wiki
.
full_path
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"wiki-
#{
project
.
id
}
"
)
expect
(
user
.
reload
.
last_activity_on
).
to
be_nil
end
...
...
@@ -337,6 +338,7 @@ describe API::Internal do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_project_path"
]).
to
eq
(
project
.
wiki
.
full_path
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"wiki-
#{
project
.
id
}
"
)
expect
(
user
.
reload
.
last_activity_on
).
to
eql
(
Date
.
today
)
end
...
...
@@ -350,6 +352,7 @@ describe API::Internal do
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"project-
#{
project
.
id
}
"
)
expect
(
json_response
[
"gl_project_path"
]).
to
eq
(
project
.
full_path
)
expect
(
json_response
[
"gitaly"
]).
not_to
be_nil
expect
(
json_response
[
"gitaly"
][
"repository"
]).
not_to
be_nil
expect
(
json_response
[
"gitaly"
][
"repository"
][
"storage_name"
]).
to
eq
(
project
.
repository
.
gitaly_repository
.
storage_name
)
...
...
@@ -369,6 +372,7 @@ describe API::Internal do
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"project-
#{
project
.
id
}
"
)
expect
(
json_response
[
"gl_project_path"
]).
to
eq
(
project
.
full_path
)
expect
(
json_response
[
"gitaly"
]).
not_to
be_nil
expect
(
json_response
[
"gitaly"
][
"repository"
]).
not_to
be_nil
expect
(
json_response
[
"gitaly"
][
"repository"
][
"storage_name"
]).
to
eq
(
project
.
repository
.
gitaly_repository
.
storage_name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment