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
Adding functionality for deleted sites in site-list solving #1335 #1355
Conversation
Thank you @joakimhogberg 👏🏻 We will review shortly. |
@@ -15,6 +15,7 @@ Option|Description | |||
`--help`|output usage information | |||
`--type [type]`|type of modern sites to list. Allowed values `TeamSite|CommunicationSite`, default `TeamSite` | |||
`-f, --filter [filter]`|filter to apply when retrieving sites | |||
`--deleted [deleted]`|use this switch to only return deleted sites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are not passing anything into this option we can just use --deleted
and remove [deleted]
return telemetryProps; | ||
} | ||
|
||
public commandAction(cmd: CommandInstance, args: CommandArgs, cb: (err?: any) => void): void { | ||
const siteType: string = args.options.type || 'TeamSite'; | ||
const webTemplate: string = siteType === 'TeamSite' ? 'GROUP#0' : 'SITEPAGEPUBLISHING#0'; | ||
let startIndex: string = '0'; | ||
let spoAdminUrl: string | ||
let spoAdminUrl: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing ;
at the end of this line
@@ -109,6 +116,10 @@ class SpoSiteListCommand extends SpoCommand { | |||
{ | |||
option: '-f, --filter [filter]', | |||
description: 'filter to apply when retrieving sites' | |||
}, | |||
{ | |||
option: '--deleted [deleted]', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are not passing anything into this option we can just use --deleted
and remove [deleted]
@@ -32,14 +33,15 @@ class SpoSiteListCommand extends SpoCommand { | |||
const telemetryProps: any = super.getTelemetryProperties(args); | |||
telemetryProps.siteType = args.options.type || 'TeamSite'; | |||
telemetryProps.filter = (!(!args.options.filter)).toString(); | |||
telemetryProps.deleted = args.options.deleted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing ;
at the end of this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @joakimhogberg 👏🏻
Just a few minor changes that I made before merging, please see review comments.
The branch to be merged with the dev
branch is here: https://github.com/garrytrinder/office365-cli/tree/feature/issue-1335
Merged manually. Thank you! 👏 |
Solves #1335. Included in PR:
--deleted
Get-SPODeletedSite