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

Extends 'spo list get' command with support for retrieving any default list in a given site #6447

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

tmaestrini
Copy link

Closes #5856.

This PR substitutes PR #6445

@tmaestrini tmaestrini changed the title 5856 retrieve default list in site Extends 'spo list get' command with support for retrieving any default list in a given site Oct 22, 2024
@milanholemans
Copy link
Contributor

Thanks, we'll have a look at it ASAP.

@Adam-it Adam-it added the hacktoberfest-accepted Accept for hacktoberfest, will merge later label Oct 29, 2024
@Adam-it
Copy link
Member

Adam-it commented Oct 29, 2024

@tmaestrini I added the hacktoberfest-accepted label to this PR which means that this PR will count as done for the Hacktoberfest event. So if you participate in this event it will get you unblocked and it allows us to merge this PR later when we catch up 👍
Thanks for your support and awesome contribution 👏 You Rock 🤩

@tmaestrini
Copy link
Author

@Adam-it Thanks a lot! :) Looking forward to my very first contribution on the M365 cli when this PR gets closed! ;)

@tmaestrini
Copy link
Author

Do you want me to do something on this? Is there anything missing?

@Adam-it
Copy link
Member

Adam-it commented Nov 7, 2024

Do you want me to do something on this? Is there anything missing?

@tmaestrini I don't think there is anything missing. We have a lot of PRs to process but we will try to catch up with this ASAP

@milanholemans milanholemans self-assigned this Dec 8, 2024
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 work @tmaestrini, I suggest we make some minor changes.

@milanholemans milanholemans marked this pull request as draft December 8, 2024 23:12
Tobias Maestrini added 4 commits December 26, 2024 00:51
@tmaestrini tmaestrini marked this pull request as ready for review December 26, 2024 23:32
@tmaestrini
Copy link
Author

@milanholemans, I guess we're good to go now. Have another review! 🙌

@milanholemans milanholemans marked this pull request as draft January 3, 2025 21:33
@milanholemans
Copy link
Contributor

@tmaestrini, did you find some time to implement the needed changes?

@tmaestrini
Copy link
Author

tmaestrini commented Jan 19, 2025

Hey @milanholemans, not yet – sorry! Will do the changes mentioned in #5856 (comment) within the next days…

Tobias Maestrini added 3 commits February 2, 2025 22:23
@tmaestrini
Copy link
Author

Hey @milanholemans, ready to review? I've implemented the changes for the --default command option as requested in #5856.

@tmaestrini tmaestrini marked this pull request as ready for review February 2, 2025 21:37
@milanholemans
Copy link
Contributor

Seems like some test broke @tmaestrini, could you take a look at it?

@milanholemans milanholemans marked this pull request as draft February 2, 2025 21:44
@tmaestrini tmaestrini marked this pull request as ready for review February 2, 2025 22:22
@tmaestrini
Copy link
Author

tmaestrini commented Feb 2, 2025

Done! Fixed the typo in the options definition… 🤦🏻‍♂️ Sorry for that.

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 work, let's modify a few things before we merge it.

@@ -35,7 +36,7 @@ class SpoListGetCommand extends SpoCommand {
}

public get description(): string {
return 'Gets information about the specific list';
return 'Gets information about the specific list or returns information about the default list in a site';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not modify the description.

@@ -54,7 +55,8 @@ class SpoListGetCommand extends SpoCommand {
title: (!(!args.options.title)).toString(),
url: (!(!args.options.url)).toString(),
properties: (!(!args.options.properties)).toString(),
withPermissions: typeof args.options.withPermissions !== 'undefined'
withPermissions: typeof args.options.withPermissions !== 'undefined',
default: typeof args.options.default !== 'undefined'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
default: typeof args.options.default !== 'undefined'
default: !!args.options.default

: Server- or site-relative URL of the list. Specify either `id`, `title`,`url` or `default` but not multiple.

`--default`
: Set if you want to return the default list from the site. Specify either `id`, `title`, `url` or `default` but not multiple.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
: Set if you want to return the default list from the site. Specify either `id`, `title`, `url` or `default` but not multiple.
: Set to retrieve the default list from the site. Specify either `id`, `title`, `url`, or `default` but not multiple.

Get the default document library located in the specified site.

```sh
m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x
m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x --default

Get information about the default (document) located in the specified site.

```sh
m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x --default
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not use the same example twice.

@milanholemans milanholemans marked this pull request as draft February 23, 2025 21:49
@milanholemans
Copy link
Contributor

Hi @tmaestrini, just checking if you had some time to look at my feedback yet. No problem if you need a couple more weeks.

@tmaestrini
Copy link
Author

Hi @milanholemans, thanks for asking.
Currently, I'm pretty busy, so I'll take care of everything after the MVP summit.

@milanholemans
Copy link
Contributor

Sure no problem! Thanks for letting us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accept for hacktoberfest, will merge later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Retrieve default list in site
3 participants