feat: use specific branch with SSH url
- Vorherrschende Sprache
- Go
- Sterne
- 300
- Forks
- 64
- Ø Merge
- 20 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, den Code zu lokalisieren, der ENVBUILDER_GIT_URL parst, und vergleiche seine Behandlung der HTTPS- und SSH-URL-Beispiele im Issue. Überprüfe, dass das Klonen der SSH-URL mit /#refs/heads/sample-branch diesen Branch auswählt, während das Klonen ohne Branch weiterhin funktioniert; im Payload ist kein Datei- oder Testpfad angegeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, go
- Bereich
- devops, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100