-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Distribution: Add commands to manage groups #5978
Conversation
import { AppDistributionClient } from "../appdistribution/client"; | ||
import { getProjectName } from "../appdistribution/options-parser-util"; | ||
|
||
export const command = new Command("appdistribution:group:create <displayName> [alias]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should alias be a named option for clarity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it as an option before, but then changed my mind and decided against it. Mainly because it's an argument in group:delete
- and I didn't want to change that.
.before(requireAuth) | ||
.action(async (emails: string[], options?: any) => { | ||
const projectName = await getProjectName(options); | ||
const appDistroClient = new AppDistributionClient(); | ||
const emailsToAdd = getEmails(emails, options.file); | ||
utils.logBullet(`Adding ${emailsToAdd.length} testers to project`); | ||
await appDistroClient.addTesters(projectName, emailsToAdd); | ||
if (options.groupAlias) { | ||
utils.logBullet(`Adding ${emailsToAdd.length} testers to group`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Consider changing the plurality of testers
depending on the length of the emails, like
firebase-tools/src/commands/ext-configure.ts
Line 145 in f5671f1
marked(`The following param${plural ? "s are" : " is"} immutable and won't be changed:`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm too lazy - there are too many places to change
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #5978 +/- ##
==========================================
+ Coverage 54.91% 54.95% +0.04%
==========================================
Files 342 342
Lines 23247 23264 +17
Branches 4753 4754 +1
==========================================
+ Hits 12766 12785 +19
+ Misses 9351 9350 -1
+ Partials 1130 1129 -1
☔ View full report in Codecov by Sentry. |
f955bb1
to
a670362
Compare
Description
appdistribution:group:create
andappdistribution:group:delete
.--group-alias
option toappdistribution:testers:add
andappdistribution:testers:remove
.Sample Commands