Skip to content

Align --with and --include options #6574

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

Open
19 tasks
waldekmastykarz opened this issue Jan 23, 2025 · 13 comments · May be fixed by #6617
Open
19 tasks

Align --with and --include options #6574

waldekmastykarz opened this issue Jan 23, 2025 · 13 comments · May be fixed by #6617

Comments

@waldekmastykarz
Copy link
Member

waldekmastykarz commented Jan 23, 2025

Across our commands we use --with... and --include... options. Since they convey the same intent, it would be more consistent to use one convention throughout. I suggest that we use --with... since it's easier to write and shorter.

  • entra m365group get --includeSiteUrl
  • entra m365group list --includeSiteUrl
  • entra pim role assignment eligibility list --includePrincipalDetails
  • entra pim role assignment list --includePrincipalDetails
  • entra pim role request list --includePrincipalDetails
  • flow list --includeSolutions
  • flow run get --includeTriggerInformation
  • graph subscription add --includeResourceData
  • pp solution publisher list --includeMicrosoftPublishers
  • purview threatassessment get --includeResults
  • spo file move --includeItemPermissions
  • spo hubsite get --includeAssociatedSites
  • spo hubsite list --includeAssociatedSites
  • spo list add --includedInMyFilesScope
  • spo list set --includedInMyFilesScope
  • spo tenant site list --includeOneDriveSites
  • spo term list --includeChildTerms
  • teams chat member add --includeAllHistory
  • viva engage network list --includeSuspended
@waldekmastykarz
Copy link
Member Author

Thoughts @pnp/cli-for-microsoft-365-maintainers?

@milanholemans
Copy link
Contributor

Good call 👍

@Jwaegebaert
Copy link
Contributor

Always up to improve consistency 👍

@Adam-it
Copy link
Member

Adam-it commented Feb 3, 2025

yep. Let's keep it consistent!
Should we open it up? @waldekmastykarz maybe we could do a bit of research and point out all places/commands that should be updated

@waldekmastykarz
Copy link
Member Author

Agreed @Adam-it!

@waldekmastykarz
Copy link
Member Author

Since this is a breaking change, we can go about it in two ways:

  1. We wait until we're closer to v11 and start working on it then.
  2. We introduce the new options besides the existing ones and make the old ones (--include...) deprecated. We remove them as we start working on v11.

Thoughts @pnp/cli-for-microsoft-365-maintainers?

@milanholemans
Copy link
Contributor

I think option 2 will be the most user-friendly one. That way people get notified way ahead about the coming change.

@Adam-it
Copy link
Member

Adam-it commented Feb 13, 2025

I think option 2 will be the most user-friendly one. That way people get notified way ahead about the coming change.

+1 to that opinion as well

@nanddeepn
Copy link
Contributor

Can I work on it?

@milanholemans
Copy link
Contributor

Thank you @nanddeepn!

@nanddeepn nanddeepn linked a pull request Mar 1, 2025 that will close this issue
@Adam-it
Copy link
Member

Adam-it commented Mar 29, 2025

@waldekmastykarz,
When doing review I noticed that IncludedInMyFilesScope in spo list add/set command and includeResourceData in graph subscription add command were named like this because they align 1:1 with the corresponding option in the API request. I wonder that if we now rename those to withInMyFilesScope and withResourceData we wont create more confusion🤔
any feed on that @pnp/cli-for-microsoft-365-maintainers?

@martinlingstuyl
Copy link
Contributor

We don't necessarily have to align with the api interface I think.

That being said, I think includedInMyFilesScope does a different thing, you can see it from the spelling (included vs include) and from the description (which is difficult to read by the way). We should NOT update this one to with. @nanddeepn. That goes for listitem add and listitem set

--includedInMyFilesScope [includedInMyFilesScope]
Specifies whether this list is accessible to an app principal that has been granted an OAuth scope that contains the string “myfiles” by a case-insensitive comparison when the current user is a site collection administrator of the personal site that contains the list.

@martinlingstuyl
Copy link
Contributor

The other options are used to include extra data on the response, while this one sets a setting on the entity instead.

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.

6 participants