From bb9fe03f25656d6bb8a56797921611eadc5bbef2 Mon Sep 17 00:00:00 2001 From: Duncan MacDonald Date: Wed, 25 Sep 2024 14:58:43 -0700 Subject: [PATCH] Add tags parameter to TestFairy upload action (#22119) * Added new parameter for optional tags * Join list of tags into comma separated string --- fastlane/lib/fastlane/actions/testfairy.rb | 10 +++++++++- fastlane/spec/actions_specs/testfairy_spec.rb | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/fastlane/lib/fastlane/actions/testfairy.rb b/fastlane/lib/fastlane/actions/testfairy.rb index 2ee8703aff0..ddd45a128f4 100644 --- a/fastlane/lib/fastlane/actions/testfairy.rb +++ b/fastlane/lib/fastlane/actions/testfairy.rb @@ -96,6 +96,8 @@ def self.run(params) [key, options_to_client.call(value).join(',')] when :custom [key, value] + when :tags + [key, value.join(',')] else UI.user_error!("Unknown parameter: #{key}") end @@ -241,7 +243,13 @@ def self.available_options env_name: "FL_TESTFAIRY_TIMEOUT", description: "Request timeout in seconds", type: Integer, - optional: true) + optional: true), + FastlaneCore::ConfigItem.new(key: :tags, + optional: true, + env_name: "FL_TESTFAIRY_TAGS", + description: "Custom tags that can be used to organize your builds", + type: Array, + default_value: []) ] end diff --git a/fastlane/spec/actions_specs/testfairy_spec.rb b/fastlane/spec/actions_specs/testfairy_spec.rb index b1f24c569ce..754d5ac5a7d 100644 --- a/fastlane/spec/actions_specs/testfairy_spec.rb +++ b/fastlane/spec/actions_specs/testfairy_spec.rb @@ -111,7 +111,8 @@ upload_url: 'https://your-subdomain.testfairy.com', comment: 'Test Comment!', testers_groups: ['group1', 'group2'], - custom: 'custom argument' + custom: 'custom argument', + tags: ['tag1', 'tag2', 'tag3'] }) end").runner.execute(:test) end.not_to(raise_error)