Skip to content

Repo management

Org-wide automation that keeps the ~28 AzureLocal repos in sync with the platform canon.

What lives here

Page Script(s)
Overview High-level map of the automation set
New-repo bootstrap New-AzureLocalRepo.ps1 — create a new repo end-to-end
Drift audit Invoke-RepoAudit.ps1 — monthly org-wide conformance report
Label sync Sync-Labels.ps1 — apply canonical 16-label set
Branch protection Sync-BranchProtection.ps1 — apply canonical rules
Common file sync Sync-CommonFiles.ps1 — propagate LICENSE, .editorconfig, .gitignore
Emergency runbooks What to do when something goes wrong org-wide

Script location

All scripts are under repo-management/org-scripts/ in the platform repo. All depend on AzureLocal.Common for logging, inventory, and conformance checks.

Invocation model

Scripts are designed to:

  • Default to dry-run / report-only when run without mutating flags.
  • Accept -Repo <name> to operate against a single repo, or no -Repo to operate against every non-archived AzureLocal repo.
  • Use Write-AzureLocalLog for colored, level-tagged output.
  • Emit JSON when -OutputPath is given (for CI consumption by drift-audit.yml).

Prerequisites

  • gh CLI authenticated with repo and admin:org scopes
  • PowerShell 7.2+
  • Platform repo cloned and AzureLocal.Common importable

Read before running destructive scripts