<commit_before>module Fastlane
  module Actions
    class EnvironmentVariableAction < Action
      def self.run(params)
        values_to_set = params[:set]
        value_to_get = params[:get]
        value_to_remove = params[:remove]

        # clear out variables that were removed
        ENV[value_to_remove] = nil unless value_to_remove.nil?

        # if we have to set variables, do that now
        unless values_to_set.nil?
          values_to_set.each do |key, value|
            ENV[key] = value
          end
        end

        # finally, get the variable we requested
        return ENV[value_to_get] unless value_to_get.nil?

        # if no variable is requested, just return empty string
        return ""
      end

      def self.author
        "taquitos"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(
            key: :set,
            env_name: 'FL_ENVIRONMENT_VARIABLE_SET',
            description: 'Set the environment variables named',
            optional: true,
            type: Hash
          ),
          FastlaneCore::ConfigItem.new(
            key: :get,
            env_name: 'FL_ENVIRONMENT_VARIABLE_GET',
            description: 'Get the environment variable named',
            optional: true,
            is_string: true
          ),
          FastlaneCore::ConfigItem.new(
            key: :remove,
            env_name: 'FL_ENVIRONMENT_VARIABLE_REMOVE',
            description: 'Remove the environment variable named',
            optional: true,
            is_string: true
          )
        ]
      end

      def self.description
        "Sets/gets env vars for Fastlane.swift. Don't use in ruby, use `ENV[key] = val`"
      end

      def self.category
        :misc
      end

      def self.return_type
        :string
      end

      def self.is_supported?(platform)<commit_msg>Do not show step text for environment_variable action. (#11626)<commit_after>module Fastlane
  module Actions
    class EnvironmentVariableAction < Action
      def self.run(params)
        values_to_set = params[:set]
        value_to_get = params[:get]
        value_to_remove = params[:remove]

        # clear out variables that were removed
        ENV[value_to_remove] = nil unless value_to_remove.nil?

        # if we have to set variables, do that now
        unless values_to_set.nil?
          values_to_set.each do |key, value|
            ENV[key] = value
          end
        end

        # finally, get the variable we requested
        return ENV[value_to_get] unless value_to_get.nil?

        # if no variable is requested, just return empty string
        return ""
      end

      def self.author
        "taquitos"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(
            key: :set,
            env_name: 'FL_ENVIRONMENT_VARIABLE_SET',
            description: 'Set the environment variables named',
            optional: true,
            type: Hash
          ),
          FastlaneCore::ConfigItem.new(
            key: :get,
            env_name: 'FL_ENVIRONMENT_VARIABLE_GET',
            description: 'Get the environment variable named',
            optional: true,
            is_string: true
          ),
          FastlaneCore::ConfigItem.new(
            key: :remove,
            env_name: 'FL_ENVIRONMENT_VARIABLE_REMOVE',
            description: 'Remove the environment variable named',
            optional: true,
            is_string: true
          )
        ]
      end

      def self.description
        "Sets/gets env vars for Fastlane.swift. Don't use in ruby, use `ENV[key] = val`"
      end

      def self.step_text
        nil
      end

      def self.category
        :misc
      end

      def self.return_type
        :string
      end

      def self.is_supported?(platform)
{'fraction_non_alphanumeric': 0.06976141078838174, 'fraction_numerical': 0.0012966804979253112, 'mean_word_length': 1.7432432432432432, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '411374', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1042, 'n_words': 295}