Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a way to select a specific branch before building the devcontainer #266

Open
ggjulio opened this issue Jul 8, 2024 · 2 comments

Comments

@ggjulio
Copy link

ggjulio commented Jul 8, 2024

Description

Improve feature parity with github codespaces.

The goal is to add a new coder_parameter called target 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 the enbuilder container.
So I think it is the responsibility of envbuilder to checkout to the target branch before building the container.


PS: The workaround in readme.md does not work on all platforms.

@ggjulio ggjulio changed the title feat: allow user to select a branch from which to select feat: allow user to select a given branch Jul 8, 2024
@ggjulio ggjulio changed the title feat: allow user to select a given branch feat: Add a way to select a given branch Jul 8, 2024
@ggjulio ggjulio changed the title feat: Add a way to select a given branch feat: Add a way to select a specific branch before building the devcontainer Jul 8, 2024
@matifali
Copy link
Member

matifali commented Jul 8, 2024

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.

@ggjulio
Copy link
Author

ggjulio commented Jul 8, 2024

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.
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants