diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/github_import/importer/milestones_importer.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/github_import/importer/milestones_importer.rb')
-rw-r--r-- | lib/gitlab/github_import/importer/milestones_importer.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/gitlab/github_import/importer/milestones_importer.rb b/lib/gitlab/github_import/importer/milestones_importer.rb index 71ff7465d9b..d11b151bbe2 100644 --- a/lib/gitlab/github_import/importer/milestones_importer.rb +++ b/lib/gitlab/github_import/importer/milestones_importer.rb @@ -6,15 +6,9 @@ module Gitlab class MilestonesImporter include BulkImporting - attr_reader :project, :client, :existing_milestones - - # project - An instance of `Project` - # client - An instance of `Gitlab::GithubImport::Client` # rubocop: disable CodeReuse/ActiveRecord - def initialize(project, client) - @project = project - @client = client - @existing_milestones = project.milestones.pluck(:iid).to_set + def existing_milestones + @existing_milestones ||= project.milestones.pluck(:iid).to_set end # rubocop: enable CodeReuse/ActiveRecord @@ -55,6 +49,10 @@ module Gitlab def each_milestone client.milestones(project.import_source, state: 'all') end + + def object_type + :milestone + end end end end |