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

New command: viva engage community get. Closes #5754 #5920

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Saurabh7019
Copy link
Contributor

Closes #5754

@milanholemans
Copy link
Contributor

Thanks @Saurabh7019! We'll try to review it ASAP.

@Saurabh7019
Copy link
Contributor Author

Hi @milanholemans , The PR is failing due to the error below. Have you encountered this issue before?

/home/runner/work/cli-microsoft365/cli-microsoft365/src/m365/viva/commands/engage/engage-community-get.ts
Error: 16:7 error 'VivaEngageCommunityGetCommand' is not a valid command class name. Expected 'VivaEngageCommUnitYGetCommand' cli-microsoft365/correct-command-class-name

@milanholemans
Copy link
Contributor

Hi, @Saurabh7019 this is because we are using a dictionary to enforce a correct naming of commands in CLI.
You can find the dictionary here:

const dictionary = [
'access',
'activation',
'activations',
'adaptive',
'administrative',
'ai',
'app',
'application',

In this case, I think we should add the word community.

@milanholemans
Copy link
Contributor

Hi @Saurabh7019, could you rebase with the latest main to resolve the merge conflict, please?

@milanholemans milanholemans marked this pull request as draft May 6, 2024 20:51
@Saurabh7019 Saurabh7019 marked this pull request as ready for review May 7, 2024 09:19
@Saurabh7019
Copy link
Contributor Author

Done!

Copy link
Contributor

@milanholemans milanholemans left a comment

Choose a reason for hiding this comment

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

Nice start @Saurabh7019, made a few comments while reviewing, could you have a look at them, please?


This command is based on an API that is currently in preview and is subject to change once the API reached general availability.

In order to use this command, you need to grant the Azure AD application used by the CLI for Microsoft 365 the permission to the Viva Engage API. To do this, execute the `cli consent --service VivaEngage` command.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a Graph command, we don't have to show this warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I may not have fully understood this. I have removed the "cli consent" part since it was not included in the issue spec. Please let me know if any other changes are needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @Saurabh7019, yes the consent part was not needed. For other viva engage commands we use the Yammer API which requires this consent. Since this command is built on Graph, we don't have to show this warning here.

docs/docs/cmd/viva/engage/engage-community-get.mdx Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.spec.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.spec.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.spec.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.spec.ts Outdated Show resolved Hide resolved
src/m365/viva/commands/engage/engage-community-get.spec.ts Outdated Show resolved Hide resolved
@milanholemans milanholemans marked this pull request as draft May 17, 2024 19:02
@Saurabh7019 Saurabh7019 marked this pull request as ready for review May 20, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New command: viva engage community get
2 participants