GitHub announced new improvements that streamline the Codespaces experience when working with multi-repository and mono-repo projects.
GitHub initially released Codespaces to address cloud-native applications that are housed in a single repository: the most common type of project on GitHub.
For those that are developing a feature that spans many different types of services, GitHub added the ability for users to configure which permissions their codespace should have on creation. This is so that users will no longer have to set up personal access tokens inside of their codespace to clone or create pull requests for other types of repositories.
Developers can specify repository permissions in their ‘devcontainer.json’ under the ‘customizations.codespaces.repositories’ so that developers will be prompted for the right set of permissions while working on the project.
“We also want to ensure that we continue to provide the ease of environment creations through simple one-click experiences that don’t require you to spend undue time understanding various configuration options,” GitHub wrote in a blog post. “However, if you need more flexibility, we’ve created a new advanced create flow for Codespaces that allows you to select various options, such as branch, region, machine type, and dev container configuration while creating your codespace.”
With the new features, repository administrators can create multiple devcontainers, each with permission sets, setup scripts, and a codespace configuration specific for certain teams. Developers can benefit by being able to select the ideal devcontainer, machine type, and region during codespace creation with the advanced creation flow as needed.