Skip to content

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

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

Adds 'spo web alert get' command. Closes #6862#7228
mvanhorn wants to merge 2 commits 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
@Adam-it

Adam-it commented Jul 15, 2026

Copy link
Copy Markdown
Member

@milanholemans I guess the related issue was quite old as I would say this command should now be spo web rule get not alert to follow the new naming convention we want to introduce, right?

@Adam-it Adam-it self-assigned this Jul 15, 2026
@milanholemans

Copy link
Copy Markdown
Contributor

Since alerts are EOL this month, I think naming it alert would not be really future-proof, indeed.

Renames the command per the review thread (alerts are EOL this month;
the underlying API object is a rule): source, tests, docs, sidebar.
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Renamed to spo web rule get across source, tests, docs, and the sidebar in fc47dca, following the thread now that alerts are EOL. Build and the focused spec (8 tests) pass locally. If you would rather a different noun than rule, happy to adjust - the rename is mechanical.

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

3 participants