summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-15 12:13:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-15 12:13:34 +0000
commitb50c9d31e395afcab172d16760c5700c8cd5bcae (patch)
treeb491040bc4ab42122ec4dab7744e6e4f42276bd1 /app/serializers
parent2cd5f04547dfda46005bae0969948174a2be72bd (diff)
downloadgitlab-ce-b50c9d31e395afcab172d16760c5700c8cd5bcae.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/project_import_entity.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/project_import_entity.rb b/app/serializers/project_import_entity.rb
index 58360321f7c..302086143c1 100644
--- a/app/serializers/project_import_entity.rb
+++ b/app/serializers/project_import_entity.rb
@@ -16,4 +16,11 @@ class ProjectImportEntity < ProjectEntity
expose :import_error, if: ->(project) { project.import_state&.failed? } do |project|
project.import_failures.last&.exception_message
end
+
+ # Only for GitHub importer where we pass client through
+ expose :relation_type do |project, options|
+ next nil if options[:client].nil? || Feature.disabled?(:remove_legacy_github_client)
+
+ ::Gitlab::GithubImport::ProjectRelationType.new(options[:client]).for(project.import_source)
+ end
end