Skip to content

Restructure repository as monorepo for PSDocs ecosystem consolidation#407

Draft
Copilot wants to merge 15 commits intomainfrom
copilot/monorepo-migration-psdocs
Draft

Restructure repository as monorepo for PSDocs ecosystem consolidation#407
Copilot wants to merge 15 commits intomainfrom
copilot/monorepo-migration-psdocs

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 2, 2026

This PR transforms PSDocs.Azure into a monorepo consolidating the complete PSDocs ecosystem:

  • PSDocs (core engine from microsoft/PSDocs)
  • PSDocs.Azure (existing content, restructured)
  • VS Code Extension (from microsoft/PSDocs-vscode)

How to Review

368 files, ~33k lines - but most are imported via git subtree. Focus on these areas:

Priority What to Review Files
🔴 High Build scripts & CI workflows build.ps1, .github/workflows/*.yml
🔴 High Path fixes for monorepo packages/psdocs-azure/pipeline.build.ps1
🟡 Medium Copilot skills .github/skills/*.md
🟢 Low Subtree imports (trusted external code) packages/psdocs/, packages/vscode-extension/

Skip These (Imported via git subtree)

  • packages/psdocs/** - Imported from microsoft/PSDocs
  • packages/vscode-extension/** (except workflow changes) - Imported from microsoft/PSDocs-vscode

Changes

Repository Structure

Packages

packages/
├── psdocs/              # PSDocs engine (added via git subtree)
├── psdocs-azure/        # Azure IaC documentation generator
└── vscode-extension/    # VS Code extension (added via git subtree)
.github/
├── skills/              # GitHub Copilot skills (4 skills)
└── workflows/
    ├── ci.yml           # Main CI with path-based filtering
    ├── vscode-ci.yml    # VS Code CI (NEW - migrated from Azure DevOps)
    ├── codeql.yml       # CodeQL security scanning (NEW)
    └── release-*.yml    # Release workflows

VS Code Extension CI/CD (Migrated from Azure DevOps)

  • Multi-channel build (preview/stable)
  • Cross-platform testing (macOS, Windows PS5.1/7.x, Ubuntu)
  • Preview auto-publish on main merge
  • CodeQL security scanning
  • Deleted: .azure-pipelines/ folder

GitHub Copilot Skills

Skill Model Purpose
monorepo-code-review opus4.5 Code review for monorepo
powershell-csharp-expert sonnet4.5 PowerShell/C# development
devops-build sonnet4.5 CI/CD and build system
documentation sonnet4.5 Documentation maintenance

Post-Merge Setup

  • Secret: Add VSCE_PAT for VS Code Marketplace
  • Environment: Create release environment
  • Security: Ensure secret scanning enabled

See MONOREPO_MIGRATION.md for complete details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.powershellgallery.com
    • Triggering command: /usr/bin/pwsh pwsh ./build.ps1 -Package psdocs-azure -Build (dns block)
    • Triggering command: /usr/bin/pwsh pwsh -Command Get-PSRepository (dns block)
    • Triggering command: /usr/bin/pwsh pwsh ./build.ps1 -Package psdocs-azure -Build ' --output-dir /tmp/playwright-logs --allowed-origins 'localhost;localhost:*;127.0.0.1;127.0.0.1git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Monorepo Migration: Consolidate PSDocs Repositories

Objective

Restructure the Azure/PSDocs.Azure repository to prepare it as the destination monorepo for consolidating:

  1. Azure/PSDocs.Azure (existing content - stays)
  2. microsoft/PSDocs (PSDocs engine - to be added)
  3. microsoft/PSDocs-vscode (VS Code extension - to be added)

Important Note

This PR creates the monorepo folder structure and CI/CD infrastructure. The actual content from microsoft/PSDocs and microsoft/PSDocs-vscode will need to be added manually using git subtree commands after this PR is merged, as that requires git history manipulation that cannot be done through file changes alone.

Changes Required

1. Create New Directory Structure

Create the following folder structure:

packages/
├── psdocs/
│   └── .gitkeep (placeholder - content will be added via git subtree)
├── psdocs-azure/
│   └── (move existing src/, tests/, templates/, examples/ here)
└── vscode-extension/
    └── .gitkeep (placeholder - content will be added via git subtree)

docs/
├── psdocs/
│   └── .gitkeep
├── psdocs-azure/
│   └── (move existing docs/ content here)
└── vscode/
    └── .gitkeep

build/
└── common.ps1

2. Move Existing PSDocs.Azure Content

Move the following to packages/psdocs-azure/:

  • src/packages/psdocs-azure/src/
  • tests/packages/psdocs-azure/tests/
  • templates/packages/psdocs-azure/templates/
  • examples/packages/psdocs-azure/examples/
  • PSDocs.Azure.slnpackages/psdocs-azure/PSDocs.Azure.sln
  • pipeline.build.ps1packages/psdocs-azure/pipeline.build.ps1
  • modules.jsonpackages/psdocs-azure/modules.json
  • ps-docs.yamlpackages/psdocs-azure/ps-docs.yaml
  • ps-project.yamlpackages/psdocs-azure/ps-project.yaml
  • ps-rule.yamlpackages/psdocs-azure/ps-rule.yaml

Move documentation:

  • docs/docs/psdocs-azure/

3. Create GitHub Actions Workflows

Create .github/workflows/ci.yml:

name: CI

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

env:
  DOTNET_VERSION: '8.0.x'
  NODE_VERSION: '20.x'

jobs:
  changes:
    runs-on: ubuntu-latest
    outputs:
      psdocs: ${{ steps.filter.outputs.psdocs }}
      psdocs-azure: ${{ steps.filter.outputs.psdocs-azure }}
      vscode: ${{ steps.filter.outputs.vscode }}
    steps:
      - uses: actions/checkout@v4
      - uses: dorny/paths-filter@v3
        id: filter
        with:
          filters: |
            psdocs:
              - 'packages/psdocs/**'
              - 'build/**'
            psdocs-azure:
              - 'packages/psdocs-azure/**'
              - 'packages/psdocs/**'
              - 'build/**'
            vscode:
              - 'packages/vscode-extension/**'

  build-psdocs:
    needs: changes
    if: needs.changes.outputs.psdocs == 'true' || github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: ${{ env.DOTNET_VERSION }}
      
      - name: Setup PowerShell
        shell: pwsh
        run: |
          if (Test-Path packages/psdocs/pipeline.build.ps1) {
            Set-Location packages/psdocs
            ./pipeline.build.ps1 -Build
          } else {
            Write-Host "PSDocs package not yet added - skipping build"
          }
      
      - name: Test PSDocs
        shell: pwsh
        run: |
          if (Test-Path packages/psdocs/pipeline.build.ps1) {
            Set-Location packages/psdocs
            ./pipeline.build.ps1 -Test
          }
      
      - name: Upload PSDocs Module
        if: success() && hashFiles('packages/psdocs/out/modules/PSDocs/') != ''
        uses: actions/upload-artifact@v4
        with:
          name: psdocs-module
          path: packages/psdocs/out/modules/PSDocs/

  build-psdocs-azure:
    needs: [changes, build-psdocs]
    if: |
      always() &&
      (needs.changes.outputs.psdocs-azure == 'true' || github.event_name == 'push') &&
      (needs.build-psdocs.result == 'success' || needs.build-psdocs.result == 'skipped')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: ${{ env.DOTNET_VERSION }}
      
      - name: Download PSDocs Module
        uses: actions/download-artifact@v4
        with:
          name: psdocs-module
          path: packages/psdocs/out/modules/PSDocs/
        continue-on-error: true
      
      - name: Install PSDocs from Gallery (fallback)
        shell: pwsh
        run: |
          if (-not (Test-Path packages/psdocs/out/modules/PSDocs)) {
            Install-Module -Name PSDocs -Scope CurrentUser -Force
          }
      
      - name: Build PSDocs.Azure
        shell: pwsh
        working-directory: packages/psdocs-azure
        run: |
          ./pipeline.build.ps1 -Build
      
      - name: Tes...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants