Closed michaelbrewer closed 2 months ago
In Open in Coder flow, some url target a specific branch, ideally git-clone would support this.
git-clone
Example urls to support
# url: https://gitlab.com/mike.brew/repo-tests.log/-/tree/feat/branch git clone https://gitlab.com/mike.brew/repo-tests.log -b feat/branch repo-tests.log
# url: https://github.com/michaelbrewer/repo-tests.log/tree/feat/branch git clone https://github.com/michaelbrewer/repo-tests.log -b feat/branch repo-tests.log
# url: https://bitbucket.org/gyftteam/repo-tests.log/src/dc427712c41a1046c355db8fb9df5da883790627/?at=feat%2Fbranch git clone https://bitbucket.org/gyftteam/repo-tests.log -b feat/branch repo-tests.log # url: https://bitbucket.org/gyftteam/repo-tests.log/src/main/ git clone https://bitbucket.org/gyftteam/repo-tests.log -b main repo-tests.log # url: https://bitbucket.org/gyftteam/repo-tests.log/src/develop/ git clone https://bitbucket.org/gyftteam/repo-tests.log -b develop repo-tests.log
It might be useful to add a flag to enable this or to have a way to set the tree reversal path used :
/-/tree/
/tree/
/src/
However there is often the case to have a single workspace template for "Open in Code" that supports multiple git projects.
Another way could be to have a list of supported endpoints?
github.com
github
bitbucket.org
bitbucket
gitlab.com
gitlab
then you can add self-hosted versions
source.mycorp.com
ado
git.mycorp.com
related pull request: https://github.com/coder/modules/pull/210
In Open in Coder flow, some url target a specific branch, ideally
git-clone
would support this.Gitlab urls
Example urls to support
Github urls
Example urls to support
Bitbucket urls
Example urls to support
NOTES
It might be useful to add a flag to enable this or to have a way to set the tree reversal path used :
/-/tree/
- for gitlab/tree/
- for github/src/
- for bitbucketHowever there is often the case to have a single workspace template for "Open in Code" that supports multiple git projects.
Another way could be to have a list of supported endpoints?
github.com
-github
bitbucket.org
-bitbucket
gitlab.com
-gitlab
then you can add self-hosted versions
source.mycorp.com
-ado
git.mycorp.com
-gitlab
related pull request: https://github.com/coder/modules/pull/210