Skip to content

Commit 06a3ed8

Browse files
knocteMersho
authored andcommitted
docs(ci): stop recommending HEAD~1
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 conventional-changelog#3892
1 parent ab19b5d commit 06a3ed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/guides/ci-setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
4343
- name: Validate current commit (last commit) with commitlint
4444
if: github.event_name == 'push'
45-
run: npx commitlint --from HEAD~1 --to HEAD --verbose
45+
run: npx commitlint --last --verbose
4646

4747
- name: Validate PR commits with commitlint
4848
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)