gitlab-org--gitlab-foss/lib/gitlab/bitbucket_import/wiki_formatter.rb
Stan Hu a9ab6dbc63 Refactor use of Shell.import_repository for Wikis
The previous behavior would pass in a list of parameters
to Shell, but we can improve this by using the WikiFormatter
and Project models to give us the same information.
2019-02-05 21:33:09 -08:00

25 lines
418 B
Ruby

# frozen_string_literal: true
module Gitlab
module BitbucketImport
class WikiFormatter
attr_reader :project
def initialize(project)
@project = project
end
def disk_path
project.wiki.disk_path
end
def full_path
project.wiki.full_path
end
def import_url
project.import_url.sub(/\.git\z/, ".git/wiki")
end
end
end
end