Skip to content

Update internal PowerShell script documentation#1993

Open
flanakin wants to merge 1 commit intodevfrom
flanakin/ps-internal
Open

Update internal PowerShell script documentation#1993
flanakin wants to merge 1 commit intodevfrom
flanakin/ps-internal

Conversation

@flanakin
Copy link
Collaborator

🛠️ Description

Updated inline .PARAMETER documentation in PowerShell scripts to match actual parameters. This ensures Get-Help output is accurate and consistent across all scripts.

Changes

Script Issues Fixed
Publish-Toolkit.ps1 Added missing AppInsightsRepo and DocsRepo params; fixed "the the" typo; added alias note for Branch
Build-Bicep.ps1 Removed documented Debug param that doesn't exist; clarified Module description
Build-Workbook.ps1 Fixed .PARAMETER order (should come before .EXAMPLE); removed nonexistent Debug param
Invoke-Task.ps1 Added 6 missing params (Major, Minor, Patch, Prerelease, Label, Version); removed Silent param that doesn't exist
New-Directory.ps1 Added missing Path param; fixed indentation formatting
Build-Toolkit.ps1 Added 5 missing params (Major, Minor, Patch, Prerelease, Label)
Build-PowerBI.ps1 Removed leading dashes from param names (-KQLKQL, -StorageStorage); added "Optional." prefix
README.md Updated Publish-Toolkit table with missing params and fixed alignment

📋 Checklist

🔬 How did you test this change?

  • 🤏 Lint tests

🙋‍♀️ Do any of the following that apply?

  • 🤏 The change is less than 20 lines of code.

📑 Did you update docs/changelog.md?

  • ❎ Log not needed (small/internal change)

📖 Did you update documentation?

  • ✅ Internal dev docs in src (required for dev)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 11, 2026 17:12
@microsoft-github-policy-service microsoft-github-policy-service bot added Micro PR 🔬 Very small PR that should be especially easy for newcomers Needs: Review 👀 PR that is ready to be reviewed labels Feb 11, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the Skill: DevOps GitHub setup and automation label Feb 11, 2026
Copy link
Contributor

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

Updates comment-based help and script documentation under src/scripts so Get-Help output and the scripts README better match the actual PowerShell parameters supported by the build/publish tooling.

Changes:

  • Expanded .PARAMETER documentation for several scripts (added missing parameters; removed non-existent ones).
  • Cleaned up wording/typos and reordered help sections for more accurate Get-Help output.
  • Updated src/scripts/README.md parameter table for Publish-Toolkit.ps1.

Reviewed changes

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

Show a summary per file
File Description
src/scripts/README.md Updates Publish-Toolkit parameter table to reflect current params and descriptions.
src/scripts/Publish-Toolkit.ps1 Aligns comment-based help with actual params (adds AppInsightsRepo/DocsRepo, fixes wording, notes Branch alias).
src/scripts/Build-Bicep.ps1 Adjusts Module parameter documentation and removes the documented Debug parameter.
src/scripts/Build-Workbook.ps1 Moves/updates parameter help content and removes documented Debug parameter.
src/scripts/Invoke-Task.ps1 Adds missing version-related parameter docs and removes the documented Silent parameter.
src/scripts/New-Directory.ps1 Adds missing Path parameter documentation and fixes indentation/formatting.
src/scripts/Build-Toolkit.ps1 Adds missing version-related parameter docs.
src/scripts/Build-PowerBI.ps1 Fixes parameter names in help (no leading dashes) and clarifies optionality.

Comment on lines +299 to +311
## 🚚 Publish-Toolkit

[Publish-Toolkit.ps1](./Publish-Toolkit.ps1) publishes a toolkit template, module, or documentation to its destination repo.

| Parameter | Description |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `‑Template` | Name of the template or module to publish. Default = * (all templates). |
| `‑QuickstartRepo` | Optional. Name of the folder where the Azure Quickstart Templates repo is cloned. Default = azure-quickstart-templates. |
| `‑RegistryRepo` | Optional. Name of the folder where the Bicep Registry repo is cloned. Default = bicep-registry-modules. |
| `‑Build` | Optional. Indicates whether the the Build-Toolkit command should be executed first. Default = false. |
| `‑Branch` | Optional. Indicates whether the changes should be committed to a new branch in the Git repo. Default = false. |
| Parameter | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `‑Template` | Optional. Name of the template or module to publish. Default = * (all templates). |
| `‑QuickstartRepo` | Optional. Name of the folder where the Azure Quickstart Templates repo is cloned. Default = azure-quickstart-templates. |
| `‑RegistryRepo` | Optional. Name of the folder where the Bicep Registry repo is cloned. Default = bicep-registry-modules. |
| `‑AppInsightsRepo` | Optional. Name of the folder where the Application Insights Workbooks repo is cloned. Default = Application-Insights-Workbooks. |
| `‑DocsRepo` | Optional. Name of the folder where the Partner Center documentation repo is cloned. Default = partner-center-pr. |
| `‑Build` | Optional. Indicates whether the Build-Toolkit command should be executed first. Default = false. |
| `‑Branch` | Optional. Indicates whether the changes should be committed to a new branch in the Git repo. Alias: Commit. Default = false. |
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

PR description indicates no changelog entry is needed, but repo guidance requires documenting every change in docs-mslearn/toolkit/changelog.md (see .github/copilot-instructions.md). Please add a brief entry (likely under the next release section) noting the internal PowerShell help/documentation updates.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
.PARAMETER Workbook
Optional. Name of the workbook folder to build.

Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

.PARAMETER Workbook is documented as optional, but $Workbook has no default and is used to build paths like $outDir/$srcDir; running without it will either fail or produce unintended paths. Update the help text to mark it as required (or implement a safe default/"build all" behavior).

Copilot uses AI. Check for mistakes.

.PARAMETER Task
Required. Name of the task to execute.
Optional. Name of the task to execute.
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Task is documented as optional, but the script is effectively a no-op unless $Task is provided (if ($Task) { ... }). Consider marking it as required in help (or explicitly stating that omitting it results in no action / prints usage).

Suggested change
Optional. Name of the task to execute.
Required. Name of the task to execute.

Copilot uses AI. Check for mistakes.
Optional. Increments the prerelease version number (0.0.0-ooo.x).

.PARAMETER Label
Optional. Indicates the label to use for prerelease versions. Allowed: dev, alpha, preview.
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Label help text omits rc, but Build-Toolkit passes -Label through to Update-Version.ps1, which allows dev, rc, alpha, preview. Update the allowed-values list here to match Update-Version to avoid misleading Get-Help output.

Suggested change
Optional. Indicates the label to use for prerelease versions. Allowed: dev, alpha, preview.
Optional. Indicates the label to use for prerelease versions. Allowed: dev, rc, alpha, preview.

Copilot uses AI. Check for mistakes.
Comment on lines 8 to 10
.PARAMETER Module
Path to the module to build.
Optional. Name of the module to build. Default = * (all modules).

Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The help text removed the .PARAMETER Debug section, but the script still documents usage of -Debug in an example later in the same help block and uses $DebugPreference to drive debug behavior. Either re-add the Debug parameter documentation and make the script an advanced script ([CmdletBinding()]) so -Debug works, or remove the -Debug example/behavior to keep Get-Help consistent.

Copilot uses AI. Check for mistakes.
@flanakin flanakin added this to the v14 milestone Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Micro PR 🔬 Very small PR that should be especially easy for newcomers Needs: Review 👀 PR that is ready to be reviewed Skill: DevOps GitHub setup and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants