summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@gitlab.com>2016-09-05 17:16:04 +0000
committerRémy Coutable <remy@gitlab.com>2016-09-05 17:16:04 +0000
commit19f5304a6e9ca7baf819933ef3e5135bae3b0777 (patch)
tree13c3cef3af8ce757aa829a851fb8b9013df25488
parent8aa025bb85cab3070a876b43d9c5462af5f35e67 (diff)
parent3111d6a9cc814e43a0ca232f586c244ef79dc8bd (diff)
downloadgitlab-ce-19f5304a6e9ca7baf819933ef3e5135bae3b0777.tar.gz
Merge branch 'fix/gitlab-export-confidential' into 'master'
Fix confidential issues made public after import Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/21803 The gitlab.com import was ignoring the confidential attribute, hence making all issues public after being imported. The API has changed in order to also expose this field. See merge request !1992
-rw-r--r--CHANGELOG1
-rw-r--r--lib/gitlab/gitlab_import/importer.rb3
-rw-r--r--spec/lib/gitlab/gitlab_import/importer_spec.rb2
3 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index bc18171d091..29a8d8bba84 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -87,6 +87,7 @@ v 8.11.5 (unreleased)
- Fix member expiration date picker after update
- Fix suggested colors options for new labels in the admin area. !6138
- Fix GitLab import button
+ - Fix confidential issues being exposed as public using gitlab.com export
v 8.11.4
- Fix resolving conflicts on forks. !6082
diff --git a/lib/gitlab/gitlab_import/importer.rb b/lib/gitlab/gitlab_import/importer.rb
index 46d40f75be6..cc49d6aac5c 100644
--- a/lib/gitlab/gitlab_import/importer.rb
+++ b/lib/gitlab/gitlab_import/importer.rb
@@ -41,7 +41,8 @@ module Gitlab
title: issue["title"],
state: issue["state"],
updated_at: issue["updated_at"],
- author_id: gl_user_id(project, issue["author"]["id"])
+ author_id: gl_user_id(project, issue["author"]["id"]),
+ confidential: issue["confidential"]
)
end
end
diff --git a/spec/lib/gitlab/gitlab_import/importer_spec.rb b/spec/lib/gitlab/gitlab_import/importer_spec.rb
index d3f1deb3837..9b499b593d3 100644
--- a/spec/lib/gitlab/gitlab_import/importer_spec.rb
+++ b/spec/lib/gitlab/gitlab_import/importer_spec.rb
@@ -13,6 +13,7 @@ describe Gitlab::GitlabImport::Importer, lib: true do
'title' => 'Issue',
'description' => 'Lorem ipsum',
'state' => 'opened',
+ 'confidential' => true,
'author' => {
'id' => 283999,
'name' => 'John Doe'
@@ -34,6 +35,7 @@ describe Gitlab::GitlabImport::Importer, lib: true do
title: 'Issue',
description: "*Created by: John Doe*\n\nLorem ipsum",
state: 'opened',
+ confidential: true,
author_id: project.creator_id
}