Skip to content

FIX: run GitHub->ADO sync on windows-latest with az + link work item - #550

Merged
bewithgaurav merged 1 commit into
devfrom
bewithgaurav/fix-sync-windows-az-workitem
Jul 27, 2026
Merged

FIX: run GitHub->ADO sync on windows-latest with az + link work item#550
bewithgaurav merged 1 commit into
devfrom
bewithgaurav/fix-sync-windows-az-workitem

Conversation

@bewithgaurav

Copy link
Copy Markdown
Collaborator

What

Fixes the GitHub → ADO mirror sync (OneBranchPipelines/github-ado-sync.yml), which was merged in #547 but fails at runtime with az: command not found.

Why it failed

The merged version runs az repos pr create on the Django-1ES-pool Linux image, which does not ship the Azure CLI on PATH. (mssql-python's sync only works because it runs on windows-latest, where az is preinstalled.)

Changes

  • Move the job to windows-latest (Microsoft-hosted, az preinstalled) — same tooling as the mssql-python sync. Script converted to pwsh.
  • Link the tracking work item on every sync PR: --work-items 46645 ("GH<>ADO Sync PRs" / AB#46645) — traceability + satisfies the work-item policy on main.
  • Behavior unchanged otherwise: pushes GitHub dev's real commits to a sync/github-dev-<ts> branch and opens a PR auto-completed as a MERGE (--squash false) — history preserved, no direct push to main, 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.

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>
Copilot AI review requested due to automatic review settings July 27, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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-latest and convert the script step from Bash to PowerShell.
  • Create sync PRs via az repos pr create with auto-complete merge (no squash) to preserve commit SHAs.
  • Link the tracking work item (--work-items 46645) on every sync PR.

Comment thread OneBranchPipelines/github-ado-sync.yml
Comment thread OneBranchPipelines/github-ado-sync.yml
Comment thread OneBranchPipelines/github-ado-sync.yml
@bewithgaurav
bewithgaurav merged commit 6e7c7b4 into dev Jul 27, 2026
7 of 67 checks passed
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