Skip to content

Commit

Permalink
Add tags parameter to TestFairy upload action (fastlane#22119)
Browse files Browse the repository at this point in the history
* Added new parameter for optional tags

* Join list of tags into comma separated string
  • Loading branch information
oct0f1sh authored Sep 25, 2024
1 parent cc78da9 commit bb9fe03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion fastlane/lib/fastlane/actions/testfairy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion fastlane/spec/actions_specs/testfairy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb9fe03

Please sign in to comment.