Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
786457ca
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
786457ca
编写于
12月 16, 2016
作者:
J
James Lopez
提交者:
Rémy Coutable
12月 19, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix for missing service when importing from EE to CE
Signed-off-by:
N
Rémy Coutable
<
remy@rymai.me
>
上级
ffcd20ce
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
1 deletion
+34
-1
changelogs/unreleased/fix-import-export-ee-services.yml
changelogs/unreleased/fix-import-export-ee-services.yml
+4
-0
lib/gitlab/import_export/project_tree_restorer.rb
lib/gitlab/import_export/project_tree_restorer.rb
+1
-1
lib/gitlab/import_export/relation_factory.rb
lib/gitlab/import_export/relation_factory.rb
+7
-0
spec/lib/gitlab/import_export/project.json
spec/lib/gitlab/import_export/project.json
+22
-0
未找到文件。
changelogs/unreleased/fix-import-export-ee-services.yml
0 → 100644
浏览文件 @
786457ca
---
title
:
Fix missing service error importing from EE to CE
merge_request
:
8144
author
:
lib/gitlab/import_export/project_tree_restorer.rb
浏览文件 @
786457ca
...
...
@@ -120,7 +120,7 @@ module Gitlab
members_mapper:
members_mapper
,
user:
@user
,
project_id:
restored_project
.
id
)
end
end
.
compact
relation_hash_list
.
is_a?
(
Array
)
?
relation_array
:
relation_array
.
first
end
...
...
lib/gitlab/import_export/relation_factory.rb
浏览文件 @
786457ca
...
...
@@ -40,6 +40,8 @@ module Gitlab
# the relation_hash, updating references with new object IDs, mapping users using
# the "members_mapper" object, also updating notes if required.
def
create
return
nil
if
unknown_service?
setup_models
generate_imported_object
...
...
@@ -217,6 +219,11 @@ module Gitlab
existing_object
end
end
def
unknown_service?
@relation_name
==
:services
&&
parsed_relation_hash
[
'type'
]
&&
!
Object
.
const_defined?
(
parsed_relation_hash
[
'type'
])
end
end
end
end
spec/lib/gitlab/import_export/project.json
浏览文件 @
786457ca
...
...
@@ -7411,6 +7411,28 @@
"category"
:
"common"
,
"default"
:
false
,
"wiki_page_events"
:
true
},
{
"id"
:
101
,
"title"
:
"JenkinsDeprecated"
,
"project_id"
:
5
,
"created_at"
:
"2016-06-14T15:01:51.031Z"
,
"updated_at"
:
"2016-06-14T15:01:51.031Z"
,
"active"
:
false
,
"properties"
:
{
},
"template"
:
false
,
"push_events"
:
true
,
"issues_events"
:
true
,
"merge_requests_events"
:
true
,
"tag_push_events"
:
true
,
"note_events"
:
true
,
"build_events"
:
true
,
"category"
:
"common"
,
"default"
:
false
,
"wiki_page_events"
:
true
,
"type"
:
"JenkinsDeprecatedService"
}
],
"hooks"
:
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录