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

context.rb « pipeline « bulk_imports « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dd121b2dbedcca835c36643970bfc5e3ad0dd2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module BulkImports
  module Pipeline
    class Context
      attr_reader :entity, :bulk_import
      attr_accessor :extra

      def initialize(entity, extra = {})
        @entity = entity
        @bulk_import = entity.bulk_import
        @extra = extra
      end

      def group
        entity.group
      end

      def current_user
        bulk_import.user
      end

      def configuration
        bulk_import.configuration
      end
    end
  end
end