Skip to content

Commit 79dcddf

Browse files
docs: explain release rules
1 parent 7d9dae4 commit 79dcddf

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020 Christoph Witzko
1+
Copyright (c) 2024 Christoph Witzko
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,40 @@ A [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) analyze
3838
Refs #133
3939
```
4040

41+
## Customizable Release Rules
42+
It is possible to customize the release rules by providing options to the analyzer. The following options are available:
43+
44+
| Option | Default |
45+
|-----------------------|---------|
46+
| `major_release_rules` | `*!` |
47+
| `minor_release_rules` | `feat` |
48+
| `patch_release_rules` | `fix` |
49+
50+
⚠️ Commits that contain `BREAKING CHANGE(S)` in their body will always result in a major release. This behavior cannot be customized yet.
51+
52+
### Rule Syntax
53+
A rule may match a specific commit type, scope or both. The following syntax is supported: `<type>(<scope>)<modifier>`
54+
55+
- `<type>`: The commit type, e.g. `feat`, `fix`, `refactor`.
56+
- `<scope>`: The commit scope, e.g. `lang`, `config`. If left empty, the rule matches all scopes (`*`).
57+
- `<modifier>`: The modifier, e.g. `!` for breaking changes. If left empty, the rule matches only commits without a modifier.
58+
- A `*` may be used as a wildcard for a type, scope or modifier.
59+
60+
### Example Rules
61+
| Commit | `feat` (or `feat(*)` | `*!` (or `*(*)!`) | `chore(deps)` | `*🚀` |
62+
|------------------------------------|----------------------|-------------------|---------------|-------|
63+
| `feat(ui): add button component` |||||
64+
| `feat!: drop support for Go 1.17` |||||
65+
| `chore(deps): update dependencies` |||||
66+
| `refactor: remove unused code` |||||
67+
| `fix🚀: correct minor typos` |||||
68+
69+
4170
## References
4271
- [Conventional Commit v1.0.0 - Examples](https://www.conventionalcommits.org/en/v1.0.0/#examples)
4372

4473
## Licence
4574

4675
The [MIT License (MIT)](http://opensource.org/licenses/MIT)
4776

48-
Copyright © 2020 [Christoph Witzko](https://twitter.com/christophwitzko)
77+
Copyright © 2024 [Christoph Witzko](https://twitter.com/christophwitzko)

0 commit comments

Comments
 (0)