-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(changelog): improve skipping via
.cliffignore
and `--skip-comm…
…it` (#413) * feat(changelog): support `.cliffignore` for skipping commits * feat(args): add `--skip-commit` argument * docs(website): add documentation about skipping commits * refactor: support ignore file for multiple repositories
- Loading branch information
Showing
13 changed files
with
145 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# skip commits by their SHA1 | ||
|
||
4f88dda8c746173ea59f920b7579b7f6c74bd6c8 | ||
10c3194381f2cc4f93eb97404369568882ed8677 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[changelog] | ||
# changelog header | ||
header = """ | ||
# Changelog\n | ||
All notable changes to this project will be documented in this file.\n | ||
""" | ||
# template for the changelog body | ||
# https://keats.github.io/tera/docs/#introduction | ||
body = """ | ||
{% if version %}\ | ||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
{% else %}\ | ||
## [unreleased] | ||
{% endif %}\ | ||
{% for group, commits in commits | group_by(attribute="group") %} | ||
### {{ group | upper_first }} | ||
{% for commit in commits %} | ||
- {{ commit.message | upper_first }}\ | ||
{% endfor %} | ||
{% endfor %}\n | ||
""" | ||
# template for the changelog footer | ||
footer = """ | ||
<!-- generated by git-cliff --> | ||
""" | ||
# remove the leading and trailing whitespace from the templates | ||
trim = true | ||
|
||
[git] | ||
# regex for parsing and grouping commits | ||
commit_parsers = [ | ||
{ message = "^feat", group = "Features", default_scope = "app" }, | ||
{ message = "^fix", group = "Bug Fixes", scope = "cli" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
git remote add origin https://github.com/orhun/git-cliff-readme-example | ||
git pull origin master | ||
git fetch --tags | ||
{ | ||
echo "06412ac1dd4071006c465dde6597a21d4367a158" | ||
echo "81fbc6365484abf0b4f4b05d384175763ad8db44" | ||
echo "e4fd3cf8e2e6f49c0b57f66416e886c37cbb3715" | ||
} >>.cliffignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
## [unreleased] | ||
|
||
### Features | ||
|
||
- Support multiple file formats | ||
- Use cache while fetching pages | ||
|
||
## [1.0.0] - 2021-07-18 | ||
|
||
### Bug Fixes | ||
|
||
- Rename help argument due to conflict | ||
|
||
### Features | ||
|
||
- Add ability to parse arrays | ||
|
||
<!-- generated by git-cliff --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 7 | ||
sidebar_position: 8 | ||
--- | ||
|
||
# Adding custom commits | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 8 | ||
sidebar_position: 9 | ||
--- | ||
|
||
# Print context | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
sidebar_position: 7 | ||
--- | ||
|
||
# Skipping commits | ||
|
||
You can use `--skip-commit` argument to skip specific commits by their SHA1 value: | ||
|
||
```bash | ||
git cliff --skip-commit a78bc368e9ee382a3016c0c4bab41f7de4503bcd | ||
``` | ||
|
||
If you have multiple commits to skip, you can either use this argument multiple times or create `.cliffignore` at the root of your repository. | ||
|
||
For example: | ||
|
||
```bash | ||
# contents of .cliffignore | ||
|
||
4f88dda8c746173ea59f920b7579b7f6c74bd6c8 | ||
10c3194381f2cc4f93eb97404369568882ed8677 | ||
``` |