abcxyz / abcxyz/guardian

[change-detect] log helpful error message when git history is not available

Open
#177 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.