coder / coder/envbuilder

feat: use specific branch with SSH url

Ouverte
#456 0 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
300
Forks
64
Merge moyen
20 min
PR mergées (30 j)
1

Description

It seems that there was an oversight when implementing the branch name parsing in `ENVBUILDER_GIT_URL` resulting in an inability to use a specific branch when cloning using an SSH URL.

Could we look into implementing this?

---

> When I work with a public repository and use HTTPS, everything works fine. I can clone the main branch and even specify another branch, as described in the documentation, like this:
> ENVBUILDER_GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer/#refs/heads/my-feature-branch
> However, when I switch to a private repository that requires SSH authentication, I can successfully clone the main branch, but I'm unable to specify a different branch (e.g., sample-branch). Here's the Git URL format I'm using for the private repo:
>
> ENVBUILDER_GIT_URL=git@gitlab.com:your-group/your-repo.git/#refs/heads/sample-branch

(https://discord.com/channels/747933592273027093/1354136229498585158/1354136229498585158)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par localiser le code qui analyse ENVBUILDER_GIT_URL et comparez la manière dont il traite les exemples d’URL HTTPS et SSH de l’issue. Vérifiez que le clonage de l’URL SSH avec /#refs/heads/sample-branch sélectionne cette branche, tandis que le clonage sans branche continue de fonctionner ; aucun chemin de fichier ou de test n’est indiqué dans le payload.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
git, go
Domaine
devops, tooling
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.