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
Kazuhiko Shiozaki
gitlab-ce
Commits
d3779489
Commit
d3779489
authored
Feb 24, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for projects ending in .wiki
parent
d74cfe7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
lib/api/internal.rb
lib/api/internal.rb
+8
-1
spec/requests/api/internal_spec.rb
spec/requests/api/internal_spec.rb
+10
-0
No files found.
lib/api/internal.rb
View file @
d3779489
...
...
@@ -14,6 +14,14 @@ module API
# ref - branch name
# forced_push - forced_push
#
helpers
do
def
wiki
@wiki
||=
params
[
:project
].
end_with?
(
'.wiki'
)
&&
!
Project
.
find_with_namespace
(
params
[
:project
])
end
end
post
"/allowed"
do
status
200
...
...
@@ -30,7 +38,6 @@ module API
# Strip out the .wiki from the pathname before finding the
# project. This applies the correct project permissions to
# the wiki repository as well.
wiki
=
project_path
.
end_with?
(
'.wiki'
)
project_path
.
chomp!
(
'.wiki'
)
if
wiki
project
=
Project
.
find_with_namespace
(
project_path
)
...
...
spec/requests/api/internal_spec.rb
View file @
d3779489
...
...
@@ -54,6 +54,16 @@ describe API::API, api: true do
project
.
team
<<
[
user
,
:developer
]
end
context
"git push with project.wiki"
do
let
(
:project
)
{
create
(
:project
,
name:
'my.wiki'
,
path:
'my.wiki'
)
}
it
do
push
(
key
,
project
)
expect
(
response
.
status
).
to
eq
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
end
end
context
"git pull"
do
it
do
pull
(
key
,
project
)
...
...
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