Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds the ability to list SharePoint file role assignments via a new command and centralizes file/permissions retrieval logic in the spo utility.
Changes:
- Updated SharePoint REST calls to use
decodedUrlinGetFolderByServerRelativePath/GetFileByServerRelativePathrequests - Added
spo.getFileByUrl()andspo.getFileRoleAssignments()helpers and refactoredspo file getto reuse them - Introduced new
spo file roleassignment listcommand with tests and documentation
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/spo.ts | Adds helper methods for file retrieval and role assignments; updates REST parameter casing |
| src/utils/spo.spec.ts | Updates URL expectations for decodedUrl and adds tests for new helpers |
| src/m365/spo/commands/file/file-roleassignment-list.ts | New command to list role assignments for a file by URL or ID |
| src/m365/spo/commands/file/file-roleassignment-list.spec.ts | Unit tests for the new command behavior and validation |
| src/m365/spo/commands/file/file-get.ts | Refactors permission retrieval to use shared spo.getFileRoleAssignments() |
| src/m365/spo/commands/file/file-get.spec.ts | Updates tests to stub spo.getFileRoleAssignments() |
| src/m365/spo/commands.ts | Registers new command constant |
| docs/src/config/sidebars.ts | Adds the new command doc to the sidebar |
| docs/docs/cmd/spo/file/file-roleassignment-list.mdx | Adds documentation page for the new command |
|
Thanks, we'll try to review it ASAP! |
|
Hi @nanddeepn, could you please check the findings from Copilot? Thank you |
|
Hi @MartinM85 |
MartinM85
left a comment
There was a problem hiding this comment.
Thank you for the contribution @nanddeepn 🚀
Looks good overall, just a few tiny things to consider. One major thing is to use the Zod schema for command options, but our AI skill can help you save a time.
MartinM85
left a comment
There was a problem hiding this comment.
Hi @nanddeepn, thank you for the contribution 🚀
Only one note from my side regarding the text output. As Copilot noticed, the doc has missing Permissions section.
MartinM85
left a comment
There was a problem hiding this comment.
Approved. I will merge it later.
Adds 'spo file roleassignment list' command. Closes #6191