[change-detect] log helpful error message when git history is not available
Open
enhancement
- Dominant language
- Go
- Stars
- 26
- Forks
- 7
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
### 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.
```
Contributor guide
Assessment
This issue has not been assessed yet.