Skip to content

Adds 'spo web alert get' command. Closes #6862#7228

Open
mvanhorn wants to merge 1 commit into
pnp:mainfrom
mvanhorn:osc/6862-web-alert-get
Open

Adds 'spo web alert get' command. Closes #6862#7228
mvanhorn wants to merge 1 commit into
pnp:mainfrom
mvanhorn:osc/6862-web-alert-get

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Closes #6862

Adds the spo web alert get command, which retrieves the details of a specific alert from a SharePoint site list.

The command accepts the SharePoint site URL (-u, --webUrl) and the alert GUID (--id), and calls Web/Alerts/GetById('<id>') expanding List, User, and List/Rootfolder so the returned payload exposes the list title, root folder path, and user principal name alongside the core alert fields.

Follows the existing spo web alert list / spo web alert remove command structure:

  • src/m365/spo/commands.ts (registers WEB_ALERT_GET)
  • src/m365/spo/commands/web/web-alert-get.ts
  • src/m365/spo/commands/web/web-alert-get.spec.ts
  • docs/docs/cmd/spo/web/web-alert-get.mdx
  • docs/src/config/sidebars.ts

@milanholemans
Copy link
Copy Markdown
Contributor

@mvanhorn, please respect our way of working and ask us to assign an issue before working on one. This will prevent two contributors from working on the same issue.
We appreciate the work you do, but respect our rules. It's already the third time we have to remind you of this.

@milanholemans
Copy link
Copy Markdown
Contributor

If you've fixed the pipeline issue, you can reopen this PR.

@milanholemans milanholemans marked this pull request as draft April 19, 2026 21:37
@mvanhorn mvanhorn force-pushed the osc/6862-web-alert-get branch from 667956a to 90f23cc Compare April 20, 2026 01:58
@mvanhorn
Copy link
Copy Markdown
Contributor Author

@milanholemans you're right, and I owe you a real apology. @Jwaegebaert flagged the same thing on #7221 two days ago and I said I'd claim issues before working on them. Then I opened this PR without doing that. That's a broken commitment, not a misunderstanding.

I've pushed a fix for the failing test (the 'sets telemetry properties' assertion was wrong - getTelemetryProperties skips required options, so it could never return true for id/webUrl) and squashed to a single commit per the One PR = One Commit convention.

I'm going to pause any new PRs to this repo until I can be sure my workflow actually claims the issue first. If you'd prefer I close this one rather than reopen, I'm happy to do that too - your call.

@mvanhorn mvanhorn marked this pull request as ready for review April 20, 2026 02:04
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: spo web alert get

2 participants