Skip to content

New command: spo site alert remove. Closes #6863#6997

Merged
milanholemans merged 3 commits intopnp:mainfrom
Saurabh7019:issue-6863
Oct 25, 2025
Merged

New command: spo site alert remove. Closes #6863#6997
milanholemans merged 3 commits intopnp:mainfrom
Saurabh7019:issue-6863

Conversation

@Saurabh7019
Copy link
Copy Markdown
Contributor

Closes #6863

@Saurabh7019 Saurabh7019 marked this pull request as ready for review October 11, 2025 19:19
@milanholemans
Copy link
Copy Markdown
Contributor

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

@milanholemans milanholemans self-assigned this Oct 12, 2025
Copy link
Copy Markdown
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.

The command is nearly perfect! When the comments below are processed, it looks good to go.

Comment thread src/m365/spo/commands/site/site-alert-remove.ts Outdated
Comment thread src/m365/spo/commands/site/site-alert-remove.ts Outdated
Comment thread docs/docs/cmd/spo/site/site-alert-remove.mdx Outdated
Comment thread src/m365/spo/commands/site/site-alert-remove.ts Outdated
Comment thread src/m365/spo/commands/site/site-alert-remove.spec.ts Outdated
Comment thread src/m365/spo/commands/site/site-alert-remove.spec.ts Outdated
Comment thread src/m365/spo/commands/site/site-alert-remove.spec.ts Outdated
Comment thread docs/docs/cmd/spo/site/site-alert-remove.mdx Outdated
@milanholemans milanholemans marked this pull request as draft October 12, 2025 23:11
@Saurabh7019 Saurabh7019 marked this pull request as ready for review October 18, 2025 14:23
Copy link
Copy Markdown
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.

Awesome, PR is good to go with some minor tweaks!

const requestOptions: CliRequestOptions = {
url: `${args.options.webUrl}/_api/web/Alerts/DeleteAlert('${formatting.encodeQueryParameter(args.options.id)}')`,
headers: {
accept: 'application/json;'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
accept: 'application/json;'
accept: 'application/json;odata=nometadata'

Comment thread src/m365/spo/commands/site/site-alert-remove.spec.ts Outdated
});

it('fails validation if webUrl is not a valid URL', async () => {
const actual = commandOptionsSchema.safeParse({ webUrl: 'foo' });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's also add a valid ID since this property is required.

@milanholemans milanholemans merged commit 4253703 into pnp:main Oct 25, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New command: spo site alert remove

2 participants