Skip to content

Adds command 'spe container remove' #6695

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

milanholemans
Copy link
Contributor

Closes #6084

@milanholemans milanholemans requested a review from Copilot April 18, 2025 22:07
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new command ("spe container remove") to remove file storage containers, along with support code and tests. Key changes include:

  • Adding a new command in src/m365/spe/commands/container/container-remove.ts along with its test suite.
  • Enhancing utility modules (spe.ts and formatting.ts) and updating related tests.
  • Updating configuration and documentation (config.ts and docs sidebars) to support the new command.

Reviewed Changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/spe.ts Adds functions to retrieve container types and container IDs.
src/utils/spe.spec.ts Tests for retrieving container types and IDs.
src/utils/formatting.ts Adds extractCsomGuid helper to format GUIDs in CSOM responses.
src/utils/formatting.spec.ts Tests for the formatting helper.
src/m365/spe/commands/container/container-remove.ts Implements the new command for container removal.
src/m365/spe/commands/container/container-remove.spec.ts Tests to validate the new command’s behavior and input validation.
src/m365/spe/commands.ts Registers the new container remove command.
src/m365/spe/ContainerProperties.ts Removes an unused interface (now covered by utility response types).
src/config.ts Adds new Graph scope for file storage container permissions.
docs/src/config/sidebars.ts Updates documentation navigation to include the new command.
Files not reviewed (2)
  • docs/docs/cmd/spe/container/container-activate.mdx: Language not supported
  • docs/docs/cmd/spe/container/container-remove.mdx: Language not supported
Comments suppressed due to low confidence (2)

src/m365/spe/commands/container/container-remove.ts:71

  • The verbose log on removing the container uses args.options.id, which may be undefined when a container is specified by name. Consider logging the computed containerId instead to provide accurate feedback.
if (this.verbose) {

src/utils/spe.ts:8

  • The test 'correctly outputs a list of container types' expects an extra property 'ApplicationRedirectUrl', but this property is not defined in the ContainerTypeProperties interface. Consider updating the interface or filtering out unexpected properties to ensure consistency.
export interface ContainerTypeProperties {

@milanholemans milanholemans force-pushed the spe-container-removerecycle branch from c57fc15 to 524b736 Compare April 18, 2025 22:09
@milanholemans milanholemans force-pushed the spe-container-removerecycle branch from 524b736 to 8b2c119 Compare April 18, 2025 22:11
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: m365 spe container remove
1 participant