Recommend repos on commands error
- Lenguaje dominante
- Go
- Estrellas
- 46.3k
- Forks
- 9k
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 97
Descripción
### Describe the feature or problem you’d like to solve
When I'm pulling a repo from a generic git server, I expect to be knowing fully which repo I want to pull, where it is situated and how to best do it.
When I'm using the github CLI, I expect the tool to help me by fixing the typos I may make, since it has access to a broader range of info than the generic case.
Example:
```
❯ gh repo clone adacore/training-material
GraphQL: Could not resolve to a Repository with the name 'adacore/training-material'. (repository)
[firing up a browser and connecting to adacore's github and using search feature to see that I made a typo]
❯ gh repo clone adacore/training_material
Cloning into 'training_material'...
```
The tool didn't help me with my typo, and since the command was longer to type than a simple git clone, it was a net loss of time to use it.
### Proposed solution
Provide a simple typo correction mechanism on the repo's organization (comparing to orgs you're part of) and on the repo's name. That would come a long way to help save time in those kind of "was it a dash or an undescore?" typos. Having the following output would be great:
```
❯ gh repo clone adacore/training-material
GraphQL: Could not resolve to a Repository with the name 'adacore/training-material'. (repository)
'adacore/training_material' exists, did you make a typo?
gh repo clone adacore/training_material
[copy-pasting the proposed solution]
❯ gh repo clone adacore/training_material
Cloning into 'training_material'...
```
as for the wrong org
```
❯ gh repo clone adcore/training_material
GraphQL: Could not resolve to a Repository with the name 'adcore/training_material'. (repository)
'adacore/training_material' exists, did you make a typo?
gh repo clone adacore/training_material
[copy-pasting the proposed solution]
❯ gh repo clone adacore/training_material
Cloning into 'training_material'...
```
Guía de contribución
Línea de trabajo
Start with the gh repo clone command and its repository-resolution error path; the issue names no implementation files or tests. Done means detecting plausible organization or repository typos and presenting a corrected, copyable gh repo clone command without preventing the original error from being understood.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- git, github, go
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100