diff --git a/Documentation/AzureDevOps/internal-mirror.md b/Documentation/AzureDevOps/internal-mirror.md index 35f326e0023..1d4f21a2712 100644 --- a/Documentation/AzureDevOps/internal-mirror.md +++ b/Documentation/AzureDevOps/internal-mirror.md @@ -1,25 +1,33 @@ -# dev.azure.com/dnceng Internal Mirror +# Mirroring GitHub to dev.azure.com/dnceng and dev.azure.com/devdiv -Public code should be mirrored to dev.azure.com/dnceng/internal (see [Azure DevOps Guidance](https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/AzureDevOpsGuidance.md)). These are the steps for setting up your GitHub repo to mirror into dev.azure.com/dnceng/internal. +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](https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/AzureDevOpsGuidance.md)). These are the steps for setting up your GitHub repo for mirroring. -1. Add the [maestro web hook](https://github.com/dotnet/arcade/blob/main/Documentation/Maestro/web-hooks.md) -2. Make sure you have created a repo in the dev.azure.com/dnceng/internal project that is in the format "{org}-{repo}" (replace any `/` with `-` in the GitHub repo name). +1. 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 -3. Create a PR to the dotnet/versions repo which adds data for repo and branches that you want mirrored to the [subscriptions json](https://github.com/dotnet/versions/blob/master/Maestro/subscriptions.json) file. Specifically, add a URI of the pattern `"https://github.com/{org}/{repo}/blob/{branch}/**/*"` for your GitHub repository to the `triggerPaths` list above `"action": "github-dnceng-azdo-mirror"`. Please alphabetize. +2. 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](https://dev.azure.com/dnceng/internal/_git/dotnet-mirroring?path=/dnceng-subscriptions.jsonc) or [devdiv subscriptions json](https://dev.azure.com/dnceng/internal/_git/dotnet-mirroring?path=/devdiv-subscriptions.jsonc) files. Specifically, add a URI for your GitHub repository to the `repos` object, then types of mirroring and regex branch patterns. Please alphabetize. -``` - "https://github.com/dotnet/project-system/blob/release/**/*", - "https://github.com/dotnet/toolset/blob/master/**/*", - "https://github.com/dotnet/toolset/blob/release/**/*", - "https://github.com/dotnet/roslyn/blob/master/**/*", - "https://github.com/dotnet/roslyn/blob/release/**/*", - "https://github.com/{org}/{repo}/blob/{branch}/**/*" // <-- insert your URI here, in alpha order. - "https://github.com/microsoft/msbuild/blob/master/**/*", - "https://github.com/microsoft/msbuild/blob/release/**/*", +Example: +```json + "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/.*" ], - "action": "github-dnceng-azdo-mirror", - "actionArguments": { -"vsoSourceBranch": "master", + "internalMerge": [ + "release/.*" // Merge release/.* -> internal/release/.* + ] + }, ```