Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-03 15:09:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-03 15:09:13 +0300
commit83916cf0a2f9254455a08a723961db34f0840df4 (patch)
tree41995d4ec0210785de1cd71853cbd1380570b2e7 /lib/gitlab/bitbucket_import
parenta9c5941625be2416fbf3b514019886e8f9658416 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/bitbucket_import')
-rw-r--r--lib/gitlab/bitbucket_import/importer.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb
index 49b8ab760f3..3dafe7c8962 100644
--- a/lib/gitlab/bitbucket_import/importer.rb
+++ b/lib/gitlab/bitbucket_import/importer.rb
@@ -92,15 +92,15 @@ module Gitlab
def import_issues
return unless repo.issues_enabled?
- # If a user creates an issue while the import is in progress, this can lead to an import failure.
- # The workaround is to allocate IIDs before starting the importer.
- allocate_issues_internal_id!(project, client)
-
create_labels
issue_type_id = ::WorkItems::Type.default_issue_type.id
- client.issues(repo).each do |issue|
+ client.issues(repo).each_with_index do |issue, index|
+ # If a user creates an issue while the import is in progress, this can lead to an import failure.
+ # The workaround is to allocate IIDs before starting the importer.
+ allocate_issues_internal_id!(project, client) if index == 0
+
import_issue(issue, issue_type_id)
end
end