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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
e94d3834
Commit
e94d3834
authored
Jul 15, 2016
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug where the project's repository path was returned instead of the wiki path
parent
4f25e317
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
lib/api/internal.rb
lib/api/internal.rb
+6
-1
spec/requests/api/internal_spec.rb
spec/requests/api/internal_spec.rb
+11
-3
No files found.
lib/api/internal.rb
View file @
e94d3834
...
...
@@ -63,7 +63,12 @@ module API
if
access_status
.
status
# Return the repository full path so that gitlab-shell has it when
# handling ssh commands
response
[
:repository_path
]
=
project
.
repository
.
path_to_repo
response
[
:repository_path
]
=
if
wiki?
project
.
wiki
.
repository
.
path_to_repo
else
project
.
repository
.
path_to_repo
end
end
response
...
...
spec/requests/api/internal_spec.rb
View file @
e94d3834
...
...
@@ -56,13 +56,21 @@ describe API::API, api: true do
context
"git push with project.wiki"
do
it
'responds with success'
do
project_wiki
=
create
(
:project
,
name:
'my.wiki'
,
path:
'my.wiki'
)
project_wiki
.
team
<<
[
user
,
:developer
]
push
(
key
,
project
.
wiki
)
push
(
key
,
project_wiki
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
eq
(
project
.
wiki
.
repository
.
path_to_repo
)
end
end
context
"git pull with project.wiki"
do
it
'responds with success'
do
pull
(
key
,
project
.
wiki
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
eq
(
project
.
wiki
.
repository
.
path_to_repo
)
end
end
...
...
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