initialize

in lib/release_tools/release_managers/client.rb [22:48]


      def initialize(target = :production)
        @sync_errors = []
        @target = target

        case target
        when :dev
          @group = 'gitlab/release/managers'
          @client = Gitlab.client(
            endpoint: DEV_API_ENDPOINT,
            private_token: ENV.fetch('RELEASE_BOT_DEV_TOKEN', nil)
          )
        when :ops
          @group = 'gitlab-org/release/managers'
          @client = Gitlab.client(
            endpoint: OPS_API_ENDPOINT,
            private_token: ENV.fetch('RELEASE_BOT_OPS_TOKEN', nil)
          )
        else
          @target = :production
          @group = 'gitlab-org/release/managers'
          @client = Gitlab.client(
            endpoint: GITLAB_API_ENDPOINT,
            private_token: ENV.fetch('RELEASE_BOT_PRODUCTION_TOKEN', nil)
          )
        end
      end