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
Boxiang Sun
gitlab-ce
Commits
03beb297
Commit
03beb297
authored
Oct 18, 2017
by
Nick Thomas
Committed by
Winnie Hellmann
Oct 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use wiki.disk_path
parent
4f62f309
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+1
-1
lib/github/import.rb
lib/github/import.rb
+1
-1
lib/gitlab/github_import/wiki_formatter.rb
lib/gitlab/github_import/wiki_formatter.rb
+1
-1
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
+1
-1
No files found.
app/services/projects/destroy_service.rb
View file @
03beb297
...
@@ -51,7 +51,7 @@ module Projects
...
@@ -51,7 +51,7 @@ module Projects
end
end
def
wiki_path
def
wiki_path
repo_path
+
'.wiki'
project
.
wiki
.
disk_path
end
end
def
trash_repositories!
def
trash_repositories!
...
...
lib/github/import.rb
View file @
03beb297
...
@@ -74,7 +74,7 @@ module Github
...
@@ -74,7 +74,7 @@ module Github
def
fetch_wiki_repository
def
fetch_wiki_repository
return
if
project
.
wiki
.
repository_exists?
return
if
project
.
wiki
.
repository_exists?
wiki_path
=
"
#{
project
.
disk_path
}
.wiki"
wiki_path
=
project
.
wiki
.
disk_path
gitlab_shell
.
import_repository
(
project
.
repository_storage_path
,
wiki_path
,
wiki_url
)
gitlab_shell
.
import_repository
(
project
.
repository_storage_path
,
wiki_path
,
wiki_url
)
rescue
Gitlab
::
Shell
::
Error
=>
e
rescue
Gitlab
::
Shell
::
Error
=>
e
# GitHub error message when the wiki repo has not been created,
# GitHub error message when the wiki repo has not been created,
...
...
lib/gitlab/github_import/wiki_formatter.rb
View file @
03beb297
...
@@ -8,7 +8,7 @@ module Gitlab
...
@@ -8,7 +8,7 @@ module Gitlab
end
end
def
disk_path
def
disk_path
"
#{
project
.
disk_path
}
.wiki"
project
.
wiki
.
disk_path
end
end
def
import_url
def
import_url
...
...
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
View file @
03beb297
...
@@ -11,7 +11,7 @@ describe Gitlab::GithubImport::WikiFormatter do
...
@@ -11,7 +11,7 @@ describe Gitlab::GithubImport::WikiFormatter do
describe
'#disk_path'
do
describe
'#disk_path'
do
it
'appends .wiki to project path'
do
it
'appends .wiki to project path'
do
expect
(
wiki
.
disk_path
).
to
eq
project
.
disk_path
+
'.wiki'
expect
(
wiki
.
disk_path
).
to
eq
project
.
wiki
.
disk_path
end
end
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