-
Notifications
You must be signed in to change notification settings - Fork 23
Restructure repository as monorepo for PSDocs ecosystem consolidation #407
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: vicperdana <7114832+vicperdana@users.noreply.github.com>
Co-authored-by: vicperdana <7114832+vicperdana@users.noreply.github.com>
Co-authored-by: vicperdana <7114832+vicperdana@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Add 4 specialized Copilot skills to .github/skills/: - monorepo-code-review.md (opus4.5): Comprehensive code review focused on monorepo consolidation and build verification - powershell-csharp-expert.md (sonnet4.5): PowerShell module and C# .NET backend development - devops-build.md (sonnet4.5): GitHub Actions workflows and InvokeBuild scripts - documentation.md (sonnet4.5): Markdown docs and MkDocs Each skill supports nested sub-agents for parallel exploration, build verification, and focused analysis tasks.
- build.ps1: Use Invoke-Build with -Task and -File parameters - ci.yml: Use 'Invoke-Build Build/Test -File ./pipeline.build.ps1' - pipeline.build.ps1: Fix paths to LICENSE, ThirdPartyNotices.txt, and docs (now at repo root level, not package level) Build verified locally - all packages compile successfully.
git-subtree-dir: packages/psdocs git-subtree-split: 7bab9feddf8a3b8ee6f2d2d3dc90df6553ee5f1b
git-subtree-dir: packages/vscode-extension git-subtree-split: 672ac07f9e60465a93b0850f22baf6e08ebf8283
…ions - Add vscode-ci.yml: Multi-channel build (preview/stable), cross-platform testing (macOS, Windows PS5.1/7.x, Ubuntu), preview auto-publish on main - Add codeql.yml: CodeQL security scanning for TypeScript/JavaScript - Update release-vscode.yml: Use InvokeBuild for stable releases - Update package.json: Change repo URLs to Azure/PSDocs.Azure - Delete .azure-pipelines/: Remove Azure DevOps pipeline (fully migrated) - Update MONOREPO_MIGRATION.md: Remove post-merge steps (subtrees added), document new workflows
- Add compile step before tests (tests need compiled output) - Use xvfb-run wrapper for Linux tests (proper display server) - Add VSIX file validation (fail fast if missing) - Fix channel variable check in pipeline.build.ps1 (was checking literal string 'Channel' instead of $Channel variable)
|
Just for visibility for now @BernieWhite fyi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Instructs code review agents to: - Focus on build scripts, workflows, and psdocs-azure package - Treat packages/psdocs and packages/vscode-extension as vendored (git subtree imports) - skip unless critical security issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 178 out of 369 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Copy LICENSE from repo root | ||
| Copy-Item -Path ../../LICENSE -Destination out/modules/PSDocs.Azure; | ||
|
|
||
| # Copy third party notices | ||
| Copy-Item -Path ThirdPartyNotices.txt -Destination out/modules/PSDocs.Azure; | ||
| # Copy third party notices from repo root | ||
| Copy-Item -Path ../../ThirdPartyNotices.txt -Destination out/modules/PSDocs.Azure; |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relative paths assume execution from packages/psdocs-azure/ directory, but InvokeBuild tasks may execute from different working directories. Use $PSScriptRoot to construct absolute paths to ensure the files are found regardless of where the script is invoked from.
|
|
||
| # After building psdocs, set up module path for psdocs-azure | ||
| if ($pkg -eq 'psdocs' -and $Build) { | ||
| Get-LocalPSDocsModule | Out-Null |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function Get-LocalPSDocsModule modifies $env:PSModulePath but its return value is piped to Out-Null, discarding the boolean result. If the local module isn't found, subsequent builds may fail silently. Consider checking the return value and handling the false case appropriately.
| Get-LocalPSDocsModule | Out-Null | |
| $moduleInitialized = Get-LocalPSDocsModule | |
| if (-not $moduleInitialized) { | |
| Write-Error "Failed to locate or initialize the local PSDocs module. Cannot continue building dependent packages." | |
| } |
| - name: Publish to VS Marketplace (Pre-release) | ||
| working-directory: packages/vscode-extension/out/package | ||
| env: | ||
| VSCE_PAT: ${{ secrets.VSCE_PAT }} |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description mentions adding the VSCE_PAT secret as a post-merge setup task, but the workflow will fail if the secret doesn't exist. Consider adding a step to check for the secret's existence or documenting this prerequisite more prominently in the workflow file itself.
This PR transforms PSDocs.Azure into a monorepo consolidating the complete PSDocs ecosystem:
microsoft/PSDocs)microsoft/PSDocs-vscode)How to Review
build.ps1,.github/workflows/*.ymlpackages/psdocs-azure/pipeline.build.ps1.github/skills/*.mdpackages/psdocs/,packages/vscode-extension/Skip These (Imported via git subtree)
packages/psdocs/**- Imported from microsoft/PSDocspackages/vscode-extension/**(except workflow changes) - Imported from microsoft/PSDocs-vscodeChanges
Repository Structure
Packages
VS Code Extension CI/CD (Migrated from Azure DevOps)
.azure-pipelines/folderGitHub Copilot Skills
monorepo-code-reviewpowershell-csharp-expertdevops-builddocumentationPost-Merge Setup
VSCE_PATfor VS Code MarketplacereleaseenvironmentSee
MONOREPO_MIGRATION.mdfor 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/usr/bin/pwsh pwsh ./build.ps1 -Package psdocs-azure -Build(dns block)/usr/bin/pwsh pwsh -Command Get-PSRepository(dns block)/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:
Important Note
This PR creates the monorepo folder structure and CI/CD infrastructure. The actual content from
microsoft/PSDocsandmicrosoft/PSDocs-vscodewill 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:
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.sln→packages/psdocs-azure/PSDocs.Azure.slnpipeline.build.ps1→packages/psdocs-azure/pipeline.build.ps1modules.json→packages/psdocs-azure/modules.jsonps-docs.yaml→packages/psdocs-azure/ps-docs.yamlps-project.yaml→packages/psdocs-azure/ps-project.yamlps-rule.yaml→packages/psdocs-azure/ps-rule.yamlMove documentation:
docs/→docs/psdocs-azure/3. Create GitHub Actions Workflows
Create
.github/workflows/ci.yml: