coder / coder/internal

Git Flow: coder/coder/v2/cli: query coderd for git repo branches

Aperta
#406 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
m
Lingua principale
Nessun dato sulla lingua
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Relates to https://github.com/coder/internal/issues/404 and https://github.com/coder/internal/issues/405

Using the endpoint added in #405, query the git remote via coderd when a user creates a workspace build using the `coder_git_repo` data source.

This ticket tracks the required work for this functionality in the CLI/API.

Implementation notes:
* If the user does not specify a URL for the `coder_git_repo` data source, we need to prompt the user to specify one so that we can check the remote.
* If the user specifies a URL but not a branch, we should prompt the user to select a remote branch.
* If the user specifies both URL and branch, no prompt is required but the check should still be performed.
* We will likely need to use a similar approach to what the [provider currently does when a parameter value is missing](https://github.com/coder/coder/blob/304007b5ea693cf4fe01f51fb123e557ad4d6955/provisionerd/runner/runner.go#L30) (`MISSING_TEMPLATE_PARAMETER`) if a user attempts to read the data source without having set a value for `data.coder_git_repo.foo.url`.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia con il flusso della sorgente dati coder_git_repo nella CLI/API e rivedi la gestione di MISSING_TEMPLATE_PARAMETER nel provisionerd/runner/runner.go indicato. Traccia l’endpoint di #405 e il percorso di build del workspace; il lavoro è completato quando la richiesta di URL e branch funziona in assenza di valori, mentre i valori espliciti continuano ad attivare il controllo remoto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
api, cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.