Skip to content

Adds minimal permissions to docs pages #6728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

milanholemans
Copy link
Contributor

@milanholemans milanholemans commented May 17, 2025

Closes #4399


In this PR:

  • I've added the response section to all Planner commands.
  • Created a script to generate the permissions section in the docs.
  • Updated the contributing page on how to correctly document command permissions, in this section, there should be a link to @waldekmastykarz's page about documenting minimal permissions (Adds support for detecting and documenting command permissions #6705), but that page doesn't exist yet.
  • On the side, I've also updated the Planner tenant settings list command's output since it was out of date.

@waldekmastykarz
Copy link
Member

Cool! The permissions page is in #6705 so let's merge it too and then we can include the reference 👏

@Jwaegebaert Jwaegebaert self-assigned this Jun 29, 2025
@Jwaegebaert Jwaegebaert requested a review from Copilot June 29, 2025 21:06
Copy link

@Copilot 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 PR enhances documentation and CLI support by introducing a minimal permissions section for commands, along with tooling to generate it, and updates related configuration and docs.

  • Add a permissions section to all Planner command docs and update the sidebar/config accordingly
  • Introduce scripts/generate-docs-permissions.mjs to auto-generate the permissions markdown
  • Update the CLI and global docs to support a new permissions help mode

Reviewed Changes

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

Show a summary per file
File Description
src/utils/md.ts Refine regex in convertAdmonitions and adjust tab stripping
src/m365/planner/commands/tenant/tenant-settings-list.ts Remove outdated defaultProperties override
src/m365/planner/commands/tenant/tenant-settings-list.spec.ts Remove corresponding defaultProperties test
src/cli/cli.ts Add 'permissions' to helpModes array
scripts/generate-docs-permissions.mjs New script to build permissions markdown tables
docs/src/config/sidebars.ts Rename sidebar label from “Help page” to “Docs page”
docs/docs/contribute/new-command/writing-the-docs.mdx Update docs guidelines with permissions tooling
docs/docs/contribute/environment-setup.mdx Generalize Node.js/npm requirement wording
docs/docs/cmd//.mdx Add ## Permissions tabs section across command docs
docs/docs/cmd/_global.mdx Extend help output options with permissions
.eslintrc.cjs Tweak TS rule configuration for .mjs files
Comments suppressed due to low confidence (3)

scripts/generate-docs-permissions.mjs:60

  • The header line lacks the same two-space indentation as the divider and dataRows, causing the table header to misalign. Consider prefixing it with two spaces (e.g., |${...}) to match the other rows.
  const header   = `|${COLS.map((h, i) => cell(h, i)).join('|')}|`;

docs/docs/cmd/planner/tenant/tenant-settings-set.mdx:39

  • This document uses <Tabs> and <TabItem> components but does not import them at the top. Add import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; before usage.
## Permissions

docs/docs/cmd/planner/task/task-set.mdx:103

  • The permissions section introduces <Tabs> and <TabItem> but the MDX does not import these components. Add the imports at the top of the file to avoid build errors.
## Permissions

Copy link
Contributor

@Jwaegebaert Jwaegebaert left a comment

Choose a reason for hiding this comment

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

Great job @milanholemans! Let’s finally get this out. There’s a merge conflict and a comment I left, but I’ll take care of both during the merge.

@@ -247,7 +247,7 @@ module.exports = {
]
}
],
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }, ],
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this is an accidental change?

Suggested change
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }, ],
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],

@Jwaegebaert Jwaegebaert modified the milestone: v10.10 Jul 13, 2025
@milanholemans milanholemans deleted the minimal-permissions branch July 13, 2025 19:40
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.

Introduce Permissions section in docs
3 participants