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 conventional-changelog#3892
  • Loading branch information
knocte authored and Mersho committed Mar 12, 2024
1 parent 758ff48 commit c0eb2f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guides/ci-setup.md
Original file line number Diff line number Diff line change
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 c0eb2f8

Please sign in to comment.