[change-detect] log helpful error message when git history is not available
- Lenguaje dominante
- Go
- Estrellas
- 26
- Forks
- 7
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 1
Descripción
### TL;DR
Change detection in guardian requires fetch-depth on the checkout action. When this requirement isn't met a generic error message is shown to the user. Instead we should detect whether the history is there and log a message suggesting adding the fetch-depth.
### Detailed design
Current error message looks like:
```
fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
dirname: missing operand
Try 'dirname --help' for more information.
Error: Process completed with exit code 123.
```
Guía de contribución
Línea de trabajo
Look for the change detection logic in the codebase, likely in a command or utility that runs git commands. Find where the error 'HEAD~1' is used. Add a check for git history availability before that command and log a helpful message about setting fetch-depth. Run the guardian CLI in a test environment without full git history to verify the new error message appears.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- git, go
- Área
- cli, developer-experience
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 65/100