Public code should be mirrored to dev.azure.com/dnceng/internal or dev.azure.com/dnceng/devdiv, depending on where your pipelines live. (see Azure DevOps Guidance). These are the steps for setting up your GitHub repo for mirroring.
- Make sure you have a repo in the dev.azure.com/dnceng/internal project with a name in the format "{org}-{repo}" (replace any
/
with-
in the GitHub repo name). Please follow up with dnceng if a repository does not exist. For DevDiv repos, the pattern is {org}-{repo}-Trusted.- Example: github.com/dotnet/arcade => dotnet-arcade
- Create a PR to the
dotnet-mirroring
internal repo which adds data for repo and branches that you want mirrored, to the dnceng subscriptions json or devdiv subscriptions json files. Specifically, add a URI for your GitHub repository to therepos
object, then types of mirroring and regex branch patterns. Please alphabetize.
Example:
"https://github.com/dotnet/source-indexer": {
"fastForward": [
"main"
]
},
"https://github.com/dotnet/sourcelink": {
"fastForward": [
"main", // Fast forward main -> main
"release/.*"
]
},
"https://github.com/dotnet/spa-templates": {
"fastForward": [
// GitHubBranchNotFound "main",
"release/.*"
],
"internalMerge": [
"release/.*" // Merge release/.* -> internal/release/.*
]
},