Open ggjulio opened 2 months ago
This should already be possible. See https://github.com/coder/envbuilder#git-branch-selection You can preformat your repo url to choose a specific branch.
I already tried with bitbucket datacenter but not luck. I'm not sure if this workaround can work on bitbucket.
Also it is not user friendly, IMO it should be as easy as github codespaces.
When using the devcontainer cli
instead of enbuilder it is quite simple, just git checkout
before invoking the cli.
Also auto completion of branches would be nice but out of the scope of envbuilder.
Description
Improve feature parity with
github codespaces
.The goal is to add a new
coder_parameter
calledtarget branch
to workspace templates. It will let the user select a branch from which to build a devcontainer.Unlike the devcontainer cli, the
git clone
happen in theenbuilder
container. So I think it is the responsibility ofenvbuilder
to checkout to the target branch before building the container.PS: The workaround in readme.md does not work on all platforms.