Skip to content

Commit

Permalink
docs(ci): stop recommending HEAD~1
Browse files Browse the repository at this point in the history
In a single-commit repo, this would lead to this error:

```
Error: fatal: ambiguous argument 'HEAD~1..HEAD': unknown revision
or path not in the working tree.
```

Now that we have the `--last` flag, this should work for the case
in which we want just to analyze the last commit, not specify a
range of commits via `--from` and `--to`.

Closes #3892
  • Loading branch information
knocte committed Feb 14, 2024
1 parent d7afe1b commit 78cb854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guides-ci-setup.md
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose
run: npx commitlint --last --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
Expand Down

0 comments on commit 78cb854

Please sign in to comment.