Skip to content

Commit 175ee4a

Browse files
authored
Be more explicit about group aliases (#268)
* Update parameter descriptions and improve invalid testers error message * Fix failing spec * Update enable access error message
1 parent 14b38a1 commit 175ee4a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ def self.available_options
201201
type: String),
202202
FastlaneCore::ConfigItem.new(key: :groups,
203203
env_name: "FIREBASEAPPDISTRO_GROUPS",
204-
description: "The groups used for distribution, separated by commas",
204+
description: "The group aliases used for distribution, separated by commas",
205205
optional: true,
206206
type: String),
207207
FastlaneCore::ConfigItem.new(key: :groups_file,
208208
env_name: "FIREBASEAPPDISTRO_GROUPS_FILE",
209-
description: "The groups used for distribution, separated by commas",
209+
description: "The group aliases used for distribution, separated by commas",
210210
optional: true,
211211
type: String),
212212
FastlaneCore::ConfigItem.new(key: :testers,

lib/fastlane/plugin/firebase_app_distribution/client/firebase_app_distribution_api_client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def distribute(release_name, emails, group_aliases)
4646
request.headers[CONTENT_TYPE] = APPLICATION_JSON
4747
end
4848
rescue Faraday::ClientError
49-
UI.user_error!("#{ErrorMessage::INVALID_TESTERS} \nEmails: #{emails} \nGroups: #{group_aliases}")
49+
UI.user_error!("#{ErrorMessage::INVALID_TESTERS} \nEmails: #{emails} \nGroup Aliases: #{group_aliases}")
5050
end
5151
UI.success("✅ Added testers/groups.")
5252
end

lib/fastlane/plugin/firebase_app_distribution/helper/firebase_app_distribution_error_message.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module ErrorMessage
1111
INVALID_APP_ID = "App Distribution could not find your app. Make sure to onboard your app by pressing the \"Get started\" button on the App Distribution page in the Firebase console: https://console.firebase.google.com/project/_/appdistribution. App ID"
1212
INVALID_PROJECT = "App Distribution could not find your Firebase project. Make sure to onboard an app in your project by pressing the \"Get started\" button on the App Distribution page in the Firebase console: https://console.firebase.google.com/project/_/appdistribution."
1313
INVALID_PATH = "Could not read content from"
14-
INVALID_TESTERS = "Could not enable access for testers. Check that the groups exist and the tester emails are formatted correctly"
14+
INVALID_TESTERS = "Could not enable access for testers. Check that the tester emails are formatted correctly, the groups exist and you are using group aliases (not group names) for specifying groups."
1515
INVALID_RELEASE_NOTES = "Failed to add release notes"
1616
SERVICE_CREDENTIALS_ERROR = "App Distribution could not generate credentials from the service credentials file specified"
1717
PLAY_ACCOUNT_NOT_LINKED = "This project is not linked to a Google Play account."

spec/firebase_app_distribution_api_client_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
519519
]
520520
end
521521
expect { api_client.distribute(release_name, emails, group_ids) }
522-
.to raise_error("#{ErrorMessage::INVALID_TESTERS} \nEmails: #{emails} \nGroups: #{group_ids}")
522+
.to raise_error("#{ErrorMessage::INVALID_TESTERS} \nEmails: #{emails} \nGroup Aliases: #{group_ids}")
523523
end
524524
end
525525

0 commit comments

Comments
 (0)