FIX: run GitHub->ADO sync on windows-latest with az + link work item - #550
Merged
Merged
Conversation
The sync YAML merged in #547 runs `az repos pr create` on the Django-1ES-pool Linux image, which does not ship the Azure CLI -> the sync failed with `az: command not found`. - Move the job to a Microsoft-hosted `windows-latest` agent, where az is preinstalled (same tooling as the mssql-python sync). Script converted to pwsh accordingly. - Still preserves full commit history: pushes GitHub dev's real commits to a sync/github-dev-<ts> branch and opens a PR auto-completed as a MERGE (--squash false). No direct push to main, no force. - Link the tracking work item on every sync PR (--work-items 46645, "GH<>ADO Sync PRs") for traceability and to satisfy the work-item policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the GitHub → Azure DevOps mirror sync pipeline so it can successfully create ADO PRs at runtime by running on a Microsoft-hosted Windows agent (where az is available), and it adds mandatory work-item linkage for traceability/policy compliance.
Changes:
- Move the sync job to
windows-latestand convert the script step from Bash to PowerShell. - Create sync PRs via
az repos pr createwith auto-complete merge (no squash) to preserve commit SHAs. - Link the tracking work item (
--work-items 46645) on every sync PR.
sumitmsft
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the GitHub → ADO mirror sync (
OneBranchPipelines/github-ado-sync.yml), which was merged in #547 but fails at runtime withaz: command not found.Why it failed
The merged version runs
az repos pr createon theDjango-1ES-poolLinux image, which does not ship the Azure CLI on PATH. (mssql-python's sync only works because it runs onwindows-latest, where az is preinstalled.)Changes
windows-latest(Microsoft-hosted, az preinstalled) — same tooling as the mssql-python sync. Script converted topwsh.--work-items 46645("GH<>ADO Sync PRs" / AB#46645) — traceability + satisfies the work-item policy onmain.dev's real commits to async/github-dev-<ts>branch and opens a PR auto-completed as a MERGE (--squash false) — history preserved, no direct push tomain, no force.Note
main's Proof of Presence + Minimum reviewers + Status policies still require a human to complete each sync PR (by design — these are org/1ES controls). This PR only fixes the runtime failure + adds work-item linking.