Commit 19f5304a authored by Rémy Coutable's avatar Rémy Coutable

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
parents 8aa025bb 3111d6a9
...@@ -87,6 +87,7 @@ v 8.11.5 (unreleased) ...@@ -87,6 +87,7 @@ v 8.11.5 (unreleased)
- Fix member expiration date picker after update - Fix member expiration date picker after update
- Fix suggested colors options for new labels in the admin area. !6138 - Fix suggested colors options for new labels in the admin area. !6138
- Fix GitLab import button - Fix GitLab import button
- Fix confidential issues being exposed as public using gitlab.com export
v 8.11.4 v 8.11.4
- Fix resolving conflicts on forks. !6082 - Fix resolving conflicts on forks. !6082
......
...@@ -41,7 +41,8 @@ module Gitlab ...@@ -41,7 +41,8 @@ module Gitlab
title: issue["title"], title: issue["title"],
state: issue["state"], state: issue["state"],
updated_at: issue["updated_at"], 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
end end
......
...@@ -13,6 +13,7 @@ describe Gitlab::GitlabImport::Importer, lib: true do ...@@ -13,6 +13,7 @@ describe Gitlab::GitlabImport::Importer, lib: true do
'title' => 'Issue', 'title' => 'Issue',
'description' => 'Lorem ipsum', 'description' => 'Lorem ipsum',
'state' => 'opened', 'state' => 'opened',
'confidential' => true,
'author' => { 'author' => {
'id' => 283999, 'id' => 283999,
'name' => 'John Doe' 'name' => 'John Doe'
...@@ -34,6 +35,7 @@ describe Gitlab::GitlabImport::Importer, lib: true do ...@@ -34,6 +35,7 @@ describe Gitlab::GitlabImport::Importer, lib: true do
title: 'Issue', title: 'Issue',
description: "*Created by: John Doe*\n\nLorem ipsum", description: "*Created by: John Doe*\n\nLorem ipsum",
state: 'opened', state: 'opened',
confidential: true,
author_id: project.creator_id author_id: project.creator_id
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment