Skip to content

New command: spo brandcenter settings list. Closes #6653#7058

Merged
milanholemans merged 3 commits intopnp:mainfrom
Saurabh7019:issue-6653
Feb 23, 2026
Merged

New command: spo brandcenter settings list. Closes #6653#7058
milanholemans merged 3 commits intopnp:mainfrom
Saurabh7019:issue-6653

Conversation

@Saurabh7019
Copy link
Copy Markdown
Contributor

Closes #6653

@Saurabh7019 Saurabh7019 marked this pull request as ready for review December 2, 2025 10:10
Copilot AI review requested due to automatic review settings December 2, 2025 10:10
Copy link
Copy Markdown

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 pull request introduces a new command spo brandcenter settings list to retrieve SharePoint Brand Center configuration settings. The implementation follows the established patterns for SPO commands that accept only global options, using the Zod schema validation approach.

  • Adds a new SPO command to list Brand Center configuration
  • Includes comprehensive test coverage with schema validation tests
  • Provides complete documentation with examples and response formats in multiple output types

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/m365/spo/commands/brandcenter/brandcenter-settings-list.ts Main command implementation that fetches Brand Center configuration via SharePoint REST API
src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Comprehensive test suite covering validation, success scenarios, and error handling
src/m365/spo/commands.ts Registers the new BRANDCENTER_SETTINGS_LIST command constant
docs/src/config/sidebars.ts Adds the new command to the documentation sidebar under brandcenter category
docs/docs/cmd/spo/brandcenter/brandcenter-settings-list.mdx Complete documentation including usage, permissions, examples, and response formats
.devproxy/api-specs/sharepoint.yaml Adds API specification for the Brand Center Configuration endpoint with security requirements

Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread docs/docs/cmd/spo/brandcenter/brandcenter-settings-list.mdx
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
@Saurabh7019 Saurabh7019 marked this pull request as draft December 2, 2025 11:02
@Saurabh7019 Saurabh7019 marked this pull request as ready for review December 2, 2025 12:27
@milanholemans
Copy link
Copy Markdown
Contributor

Thanks! We'll try to review it soon.

@milanholemans milanholemans self-assigned this Jan 15, 2026
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.

Nice work! Let's do a couple of changes before we merge it.

Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread src/m365/spo/commands/brandcenter/brandcenter-settings-list.spec.ts Outdated
Comment thread docs/docs/cmd/spo/brandcenter/brandcenter-settings-list.mdx
Comment thread docs/docs/cmd/spo/brandcenter/brandcenter-settings-list.mdx Outdated
@milanholemans milanholemans marked this pull request as draft January 15, 2026 17:36
@Saurabh7019 Saurabh7019 force-pushed the issue-6653 branch 3 times, most recently from 9e5cf9f to e117083 Compare January 16, 2026 12:00
@Saurabh7019 Saurabh7019 marked this pull request as ready for review January 16, 2026 12:07
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 work! Made a few small adjustments while merging.

});

await command.action(logger, { options: {} });
assert.strictEqual(getStub.firstCall.args[0].url, 'https://contoso.sharepoint.com/_api/Brandcenter/Configuration');
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.

This is actually already tested in the stub defined above. Instead, we should just check if the stub was executed once.

});

await command.action(logger, { options: { verbose: true } });
assert(loggerLogSpy.calledWith(successResponse));
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 be a bit more strict here:

Suggested change
assert(loggerLogSpy.calledWith(successResponse));
assert(loggerLogSpy.calledOnceWithExactly(successResponse));

```json
{
"BrandColorsListId": "00000000-0000-0000-0000-000000000000",
"BrandColorsListUrl": null,
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.

Enhanced the response with this property.

@milanholemans milanholemans merged commit aadbba0 into pnp:main Feb 23, 2026
10 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 brandcenter settings list

3 participants