Skip to content

Commit

Permalink
feat: add --verbose option to the CLI to pretty print commits
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDeJong-TomTom committed Dec 7, 2023
1 parent 73249e0 commit 67937cc
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 63 deletions.
23 changes: 18 additions & 5 deletions dist/bump/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

153 changes: 127 additions & 26 deletions dist/cli/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions dist/validate/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,21 @@ Usage: commisery check [options] [TARGET...]
Checks whether commit messages adhere to the Conventional Commits standard.

Arguments:
TARGET The `TARGET` can be:
TARGET The `TARGET` can be:
- a single commit hash
- a file containing the commit message to check
- a revision range that `git rev-list` can interpret
When TARGET is omitted, 'HEAD' is implied.

Options:
-h, --help display help for command
-v, --verbose Prints the commit message metadata (default: false)
-h, --help display help for command
```

> :bulb: the `--verbose` will provide an overview of the parsed Conventional Commits elements.
> This can be valuable to investigate scenarios in which you expected a different version bump than
> the actual output of the `bump`-action.
### (Pre-) Commit hook

You can use the CLI as a hook in Git to check messages you wrote by creating a `.git/hooks/commit-msg` file with these contents:
Expand Down
Loading

0 comments on commit 67937cc

Please sign in to comment.