Skip to content
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

Extend 'team user app remove' command with --userName (UPN) . Closes #5446 #5457

Closed
wants to merge 4 commits into from

Conversation

reshmee011
Copy link
Contributor

Extend 'team user app remove' command with --userName (UPN) . Closes #5446

@milanholemans
Copy link
Contributor

Thank you @reshmee011! Seems like the pipeline fails, could you have a look please?

@milanholemans milanholemans marked this pull request as draft September 5, 2023 20:55
@reshmee011
Copy link
Contributor Author

@milanholemans: I will look into resolving the failures. Hope all is well with you.

@reshmee011 reshmee011 marked this pull request as ready for review September 7, 2023 07:31
Copy link
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @reshmee011, it seems that we could simplify the code and speed up its execution. Let's adjust it before we merge it, k?

src/m365/teams/commands/user/user-app-remove.ts Outdated Show resolved Hide resolved
@waldekmastykarz waldekmastykarz marked this pull request as draft October 8, 2023 12:17
@waldekmastykarz waldekmastykarz self-assigned this Oct 8, 2023
@reshmee011 reshmee011 marked this pull request as ready for review October 9, 2023 03:43
@waldekmastykarz waldekmastykarz added hacktoberfest-accepted Accept for hacktoberfest, will merge later and removed hacktoberfest-accepted Accept for hacktoberfest, will merge later labels Oct 27, 2023
Copy link
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nicely done with a few cosmetic changes I've done when merging the PR 👏

@@ -13,6 +14,7 @@ interface CommandArgs {
interface Options extends GlobalOptions {
id: string;
userId: string;
userName: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the user can specify either userName or userId both should be marked as optional

const endpoint: string = `${this.resource}/v1.0`;

const requestOptions: CliRequestOptions = {
url: `${endpoint}/users/${args.options.userId}/teamwork/installedApps/${args.options.id}`,
url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps/${args.options.id}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@waldekmastykarz
Copy link
Member

Merged manually. Thank you! 👏

@reshmee011 reshmee011 deleted the team-user-app-remove branch December 3, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Extend teams user app remove command with --userName option
3 participants