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

Enhancement: Create teams util #5901

Closed
milanholemans opened this issue Mar 10, 2024 · 7 comments
Closed

Enhancement: Create teams util #5901

milanholemans opened this issue Mar 10, 2024 · 7 comments

Comments

@milanholemans
Copy link
Contributor

Currently, we have quite some utils: planner, entraUser, entraGroup, ... One util that's missing here is teams. We have quite some commands where you can reference a team by name, or a channel by name. This is logic that we could centralize.

Suggestion for util functions to add:

Function heading Description
getTeamByDisplayName(displayName: string): Promise<Group> Get a single team by its display name.
getTeamIdByDisplayName(displayName: string): Promise<string> Get the ID of a team by its display name.
getChannelByDisplayName(teamId: string, displayName: string): Promise<Channel> Get a single channel by its display name.
getChannelIdByDisplayName(teamId: string, displayName: string): Promise<string> Get the ID of a channel by its display name.

Some things to take into account:

  • Let's always add a JSDoc comment above the function so it's clear what the util is used for.
  • Let's throw a decent error when an item is not found.
  • Let's implement interactivity to disambiguate when multiple results are found.
@milanholemans milanholemans added enhancement needs peer review Needs second pair of eyes to review the spec or PR labels Mar 10, 2024
@AndersonMartins1

This comment was marked as off-topic.

@MathijsVerbeeck
Copy link
Contributor

@milanholemans I have created a Teams-util which covers quite a few of those changes in #5867.

@AndersonMartins1

This comment was marked as off-topic.

@milanholemans
Copy link
Contributor Author

@milanholemans I have created a Teams-util which covers quite a few of those changes in #5867.

Thanks for the heads-up @MathijsVerbeeck. For the overlapping functions, could you align them with the functions in my issue?
Also, could you rename the util to teams since we refer to the whole Teams environment. Now it looks like it only does stuff for Microsoft Teams teams.

MathijsVerbeeck added a commit to MathijsVerbeeck/cli-microsoft365 that referenced this issue Mar 16, 2024
@Adam-it
Copy link
Member

Adam-it commented Apr 5, 2024

@milanholemans since the implementation kinda started already maybe we should just open it up.
@MathijsVerbeeck would you like to take the lead on this on and may I assign you since you already started in a different issue?

@MathijsVerbeeck
Copy link
Contributor

Sure!

@Adam-it Adam-it added work in progress and removed needs peer review Needs second pair of eyes to review the spec or PR labels Apr 5, 2024
@MathijsVerbeeck
Copy link
Contributor

FYI - I'll start working on this as soon as #5867 is merged as I already use a teams util in here.

MathijsVerbeeck added a commit to MathijsVerbeeck/cli-microsoft365 that referenced this issue Jul 18, 2024
@milanholemans milanholemans added this to the v10 milestone Oct 17, 2024
tmaestrini pushed a commit to tmaestrini/cli-microsoft365 that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants