summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-12-16 17:44:22 +0100
committerRémy Coutable <remy@rymai.me>2016-12-19 17:35:51 +0100
commitab06313c36fc5856b2472d3dfcb966a8c6341d0b (patch)
treeea6d499de443ada8364337c194e1d08b4e28682f /lib/gitlab/github_import/importer.rb
parente046e4c14d06a19cc30a679f4943c77b56ee6d0c (diff)
downloadgitlab-ce-ab06313c36fc5856b2472d3dfcb966a8c6341d0b.tar.gz
Add Project#gitea_import?22348-gitea-importer
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/github_import/importer.rb')
-rw-r--r--lib/gitlab/github_import/importer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index c53cd1a928d..ec1318ab33c 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -22,7 +22,7 @@ module Gitlab
opts = {}
# Gitea plan to be GitHub compliant
- if project.import_type == 'gitea'
+ if project.gitea_import?
uri = URI.parse(project.import_url)
host = "#{uri.scheme}://#{uri.host}:#{uri.port}#{uri.path}".sub(%r{/?[\w-]+/[\w-]+\.git\z}, '')
opts = {
@@ -53,7 +53,7 @@ module Gitlab
# Gitea doesn't have a Release API yet
# See https://github.com/go-gitea/gitea/issues/330
- unless project.import_type == 'gitea'
+ unless project.gitea_import?
import_releases
end
@@ -141,7 +141,7 @@ module Gitlab
merge_request = gh_pull_request.create!
# Gitea doesn't return PR in the Issue API endpoint, so labels must be assigned at this stage
- if project.import_type == 'gitea'
+ if project.gitea_import?
apply_labels(merge_request, raw)
end
rescue => e