Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
cfad6df6239d
Commit
bc734d34
authored
Oct 20, 2017
by
Nick Thomas
Browse files
Merge branch '37391-wiki-disk-path-helper' into 'master'
Use wiki.disk_path See merge request gitlab-org/gitlab-ce!14930
parents
e69aab8643ed
1113fbdf21d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/services/projects/destroy_service.rb
View file @
cfad6df6
...
...
@@ -51,7 +51,7 @@ def repo_path
end
def
wiki_path
repo_path
+
'.wiki'
project
.
wiki
.
disk_path
end
def
trash_repositories!
...
...
lib/github/import.rb
View file @
cfad6df6
...
...
@@ -74,7 +74,7 @@ def fetch_remote(forced: false)
def
fetch_wiki_repository
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
)
rescue
Gitlab
::
Shell
::
Error
=>
e
# GitHub error message when the wiki repo has not been created,
...
...
lib/gitlab/github_import/wiki_formatter.rb
View file @
cfad6df6
...
...
@@ -8,7 +8,7 @@ def initialize(project)
end
def
disk_path
"
#{
project
.
disk_path
}
.wiki"
project
.
wiki
.
disk_path
end
def
import_url
...
...
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
View file @
cfad6df6
...
...
@@ -11,7 +11,7 @@
describe
'#disk_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
...
...
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