Replace branch-mirror-status prompt file with PowerShell script#53982
Replace branch-mirror-status prompt file with PowerShell script#53982lbussell wants to merge 3 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces the previously added branch-mirror-status Copilot prompt file with a deterministic PowerShell script that checks whether public GitHub release branches are mirrored to the corresponding internal Azure DevOps branches, producing markdown output suitable for sharing.
Changes:
- Added
eng/Get-BranchMirrorStatus.ps1to query GitHub (viagh) and AzDo (viaaz rest) and emit a markdown status table. - Removed the Copilot prompt file
.github/prompts/branch-mirror-status.prompt.mdsince prompt files are editor-scoped and the logic is scriptable.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| eng/Get-BranchMirrorStatus.ps1 | Implements the branch mirror check and markdown reporting using gh + az rest. |
| .github/prompts/branch-mirror-status.prompt.md | Removes the prior editor-only prompt file now superseded by the script. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| $probeUrl = "$AzDoOrg/internal/_apis/git/repositories?api-version=7.1&`$top=1" | ||
| $null = az rest --method get --url $probeUrl --resource $AzDoResourceId --only-show-errors 2>&1 | ||
| if ($LASTEXITCODE -ne 0) { | ||
| $errors += "Cannot access Azure DevOps (dnceng/internal). Run ``az login`` and ensure you have access to the dnceng organization." |
There was a problem hiding this comment.
in testing this locally, I always hit this error. I'm logged into az already (that experience isn't great btw). I have the az devops extension installed already, and az devops project list lists dnceng. What am I missing?
There was a problem hiding this comment.
Let me try on a different box and get back to you.
There were two problems with
branch-mirror-statusprompt file introduced in #53902.Evaluation
Example Output