@@ -7,7 +7,7 @@ Configures Codespace to work with an external Git repository
77
88``` json
99"features" : {
10- "ghcr.io/microsoft/codespace-features/external-repository:2 " : {}
10+ "ghcr.io/microsoft/codespace-features/external-repository:3 " : {}
1111}
1212```
1313
@@ -16,7 +16,7 @@ Configures Codespace to work with an external Git repository
1616| Options Id | Description | Type | Default Value |
1717| -----| -----| -----| -----|
1818| gitProvider | Git Provider | string | azuredevops |
19- | cloneUrl | Clone URL without username: https://dev.azure.com/{organization}/{project}/_git/{repository} | string | - |
19+ | cloneUrl | Clone URL without username: https://dev.azure.com/{organization}/{project}/_git/{repository} . Separate multiple URLs with comma. | string | - |
2020| folder | Specify the workspace path in the devcontainer for the clone | string | /workspaces/external-repos |
2121| username | Username for clone (if required) | string | codespaces |
2222| cloneSecret | Name of the Codespaces repository secret that contains the token or password for clone. Example: ADO_PAT | string | - |
@@ -28,6 +28,12 @@ Configures Codespace to work with an external Git repository
2828| timeout | Timeout for the clone operation | string | 30m |
2929| telemetrySource | Configure source of Git commit telemetry | string | none |
3030
31+ ## Customizations
32+
33+ ### VS Code Extensions
34+
35+ - ` ms-codespaces-tools.ado-codespaces-auth `
36+
3137This feature standardizes and simplifies the proces of setting up a Codespace
3238to work with an external repository -- meaning a Git repository other than
3339the one that defines your Codespace. This is being primarily developed to
@@ -84,6 +90,26 @@ If a user configures a Codespaces User Secret named `ADO_SECRET` and assigns thi
8490Codespace, then the value of that secret will be used as a PAT for authentication. If the secret
8591is not defined by the user it will fallback to the browser login.
8692
93+ ## Multiple Repository Support
94+
95+ As of version 3, you can clone multiple repositories by separating the URL's with a comma. In this
96+ mode all of the repositories will be cloned to the folder. Each will get a local folder name from the
97+ last part of the clone URL so this value has to be unique for each repository specified.
98+
99+ ## AzDO Branch Support
100+
101+ When ` external-git config ` is executed it will check the branch name of the Codespaces bridge repository
102+ and if it begins with "azdo/" then it will treat the rest of the branch name as an AzDO branch name
103+ to checkout on the external repository. The idea here is that a utility could be created in AzDO that
104+ would let you open a Pull Request in a Codespace. The process would create a new branch in the bridge
105+ repository named "azdo/branch/name" and then create the Codespace on that branch name. When the Codespace
106+ opens and clones the AzDO repository default branch it will then detect the need to fetch and checkout
107+ the requested branch.
108+
109+ If a different process is desired for determining the branch name, then an environment variabled named
110+ ` AZDO_BRANCH ` can be created with the name of the branch that should be checked out. When the ` external-git config `
111+ command runs it will also detect that this envvar is set and checkout that
112+
87113## Usage Telemetry
88114
89115If you are looking for ways to track usage of Codespaces within your team, we offer a mechanism
0 commit comments