Skip to content

Conversation

@danieljurek danieljurek moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🍔🌭 Nov 6, 2025
@danieljurek danieljurek marked this pull request as ready for review November 6, 2025 05:59
Copilot AI review requested due to automatic review settings November 6, 2025 05:59
@danieljurek danieljurek requested a review from antkmsft as a code owner November 6, 2025 05:59
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

This PR adds documentation automation infrastructure for the C++ SDK to support automated generation of docs.microsoft.com (Docs.MS) content. The changes enable automatic updates to documentation metadata, table of contents, and package onboarding configurations.

Key changes:

  • Adds PowerShell scripts for Docs.MS table of contents generation and package onboarding
  • Integrates documentation publishing into the release pipeline
  • Configures documentation repository sync in the docindex pipeline

Reviewed Changes

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

Show a summary per file
File Description
sdk/template/azure-template/CHANGELOG.md Adds "Other Changes" section header in changelog
eng/scripts/docs/Docs-ToC.ps1 New script with functions for generating Docs.MS table of contents for C++ packages
eng/scripts/docs/Docs-Onboarding.ps1 New script with functions for managing C++ package onboarding to Docs.MS
eng/scripts/Language-Settings.ps1 Adds documentation-related variables and the Get-cpp-DocsMsMetadataForPackage function
eng/pipelines/templates/stages/archetype-cpp-release.yml Adds new PublishDocsMs job to release pipeline
eng/pipelines/docindex.yml Adds UpdateDocsMsBuildConfig job to update documentation configuration
.vscode/cspell.json Adds custom dictionary entries for documentation-related terms
.gitignore Excludes docs directory but includes eng/scripts/docs

# If there is a metadata json for the package use the DocsMsReadmeName from
# the metadata function
if ($packageMetadata.PSObject.Members.Name -contains "FileMetadata") {
$readmeMetadata = &$GetDocsMsMetadataForPackageFn -PackageInfo $packageMetadata.FileMetadata
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The variable $GetDocsMsMetadataForPackageFn is used but not defined in this script. This variable should be available when common.ps1 is sourced. However, since Docs-ToC.ps1 is sourced directly in Language-Settings.ps1 (line 9) before common.ps1 is loaded, this variable will be undefined when the script is first parsed. Consider moving the sourcing of Docs-ToC.ps1 to after the common scripts are loaded, or ensure this script is only called after the common environment is initialized.

Copilot uses AI. Check for mistakes.
# $GetDocsMsTocDataFn = "Get-${Language}-DocsMsTocData"
function Get-cpp-DocsMsTocData($packageMetadata, $docRepoLocation) {
$packageLevelReadmeName = GetPackageReadmeName -packageMetadata $packageMetadata
$packageTocHeader = GetDocsTocDisplayName $packageMetadata
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The function GetDocsTocDisplayName is called but not defined in this script. This function is defined in eng/common/scripts/Helpers/Package-Helpers.ps1, which should be available through common.ps1. However, similar to Comment 1, this dependency may not be satisfied when this script is sourced early in Language-Settings.ps1. Ensure proper sourcing order or add explicit dependency documentation.

Copilot uses AI. Check for mistakes.
}

# $GetRepositoryLinkFn = "Get-${Language}-RepositoryLink"
function Get-cpp-RepositoryLink($packageInfo) {
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The variable $PackageRepositoryUri is used but not defined in this script. While it is defined in Language-Settings.ps1 (line 7), the sourcing order in Language-Settings.ps1 loads Docs-ToC.ps1 (line 9) before the variable is defined (line 7 comes before line 9), so this should work. However, this creates a fragile dependency where the order of declarations in the parent script matters. Consider explicitly passing this as a parameter or documenting this dependency.

Suggested change
function Get-cpp-RepositoryLink($packageInfo) {
function Get-cpp-RepositoryLink($packageInfo, $PackageRepositoryUri) {

Copilot uses AI. Check for mistakes.

- task: AzureCLI@2
displayName: Queue Docs CI build
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(${{ parameters.StartMainSDKCIRun }}, true)))
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

[nitpick] The parameter name in the display text uses 'SDK CI' but the condition references it as 'StartMainSDKCIRun'. While this is consistent, the display name says 'Kick off the main SDK CI docs run' which could be clearer. Consider updating the display name to 'Start Main SDK CI Run' for consistency with the parameter name.

Copilot uses AI. Check for mistakes.
$GithubUri = "https://github.com/Azure/azure-sdk-for-cpp"
$PackageRepositoryUri = "https://github.com/microsoft/vcpkg/tree/master/ports"

. "$PSScriptRoot/docs/Docs-ToC.ps1"
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

Sourcing Docs-ToC.ps1 at this location (line 9) occurs before the common scripts that define required variables like $GetDocsMsMetadataForPackageFn are loaded. While PowerShell allows this because function bodies are evaluated at call time, not parse time, this creates a fragile dependency order. Consider moving this line to after function definitions but before they are used, or add a comment explaining this dependency.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔬 Dev in PR

Development

Successfully merging this pull request may close these issues.

3 participants