Skip to content

Commit

Permalink
Merge branch 'main' into feat/regex-tag_pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 19, 2023
2 parents 832e7e2 + 290c021 commit 0fababf
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check typos
uses: crate-ci/typos@master
- name: Generate a changelog
uses: orhun/git-cliff-action@main
id: git-cliff
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ jobs:
command: check
args: --locked --no-default-features --verbose

typos:
name: Typos
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check typos
uses: crate-ci/typos@master

test:
name: Test suite
runs-on: ubuntu-22.04
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ All notable changes to this project will be documented in this file.
- *(args)* Add `--output` argument - ([e0cda23](https://github.com/orhun/git-cliff/commit/e0cda238105e0ce22ac71409d6e3ee0e32a6bad7))
- *(args)* Add `--workdir` argument - ([de439be](https://github.com/orhun/git-cliff/commit/de439bef01e0e1209b8517ce7b241bb0db2cb530))
- *(changelog)* Support setting the body template via args - ([9fc08f4](https://github.com/orhun/git-cliff/commit/9fc08f4c50160374298bf77701ee5e299fa435a0))
- *(logs)* Show the processsed commit message - ([45dccf7](https://github.com/orhun/git-cliff/commit/45dccf74a4a5449d92d453d21b6566acd8f30ebe))
- *(logs)* Show the processed commit message - ([45dccf7](https://github.com/orhun/git-cliff/commit/45dccf74a4a5449d92d453d21b6566acd8f30ebe))

### 🐛 Bug Fixes

Expand All @@ -748,7 +748,7 @@ All notable changes to this project will be documented in this file.
- *(cd)* Generate changelog on a dedicated/different job - ([2f16dd5](https://github.com/orhun/git-cliff/commit/2f16dd5ae7f4bbff7b9944db039192d8ce148655))
- *(cd)* Fix the syntax of publish step arguments - ([6414789](https://github.com/orhun/git-cliff/commit/6414789067780d0551292c004a8aaff04483906d))
- *(cd)* Use a separate step for setting the changelog body - ([f038054](https://github.com/orhun/git-cliff/commit/f038054417f608b5792b89f60b4d384b74b317dd))
- *(cd)* Publish the cargo workspace members seperately - ([acc1d34](https://github.com/orhun/git-cliff/commit/acc1d3453ca865ddbf3e8e786fcc157c8e31eae6))
- *(cd)* Publish the cargo workspace members separately - ([acc1d34](https://github.com/orhun/git-cliff/commit/acc1d3453ca865ddbf3e8e786fcc157c8e31eae6))
- *(cd)* Strip the changelog header before escaping - ([6b97c2d](https://github.com/orhun/git-cliff/commit/6b97c2d18c05fb9cf27088a39b24d12ab1b0c556))
- *(cd)* Use printf to prevent field splitting the variable - ([92a4b0d](https://github.com/orhun/git-cliff/commit/92a4b0d5bfb8c27627886005d0e6d823a3cc6476))
- *(cd)* Double quote the environment variable - ([85aa1cd](https://github.com/orhun/git-cliff/commit/85aa1cdc688b74d1d2df46dc61e6aa5561fc6ace))
Expand Down Expand Up @@ -810,7 +810,7 @@ All notable changes to this project will be documented in this file.
- *(cargo)* Update project details - ([22f0a7e](https://github.com/orhun/git-cliff/commit/22f0a7ef73cb1649d9ed59e43ee0e410b456233d))
- *(cd)* Enable crates.io releases - ([31ecfd8](https://github.com/orhun/git-cliff/commit/31ecfd8ad041e36090575e5851ff00d491ccebca))
- *(cd)* Use only one step for uploading releases - ([42a714f](https://github.com/orhun/git-cliff/commit/42a714f31cf5b6f924fe68d966189e2c278a11a6))
- *(cd)* Use seperate steps for uploading releases - ([0182533](https://github.com/orhun/git-cliff/commit/01825330d90a9399c9285b5a286b1d69aa1494e7))
- *(cd)* Use separate steps for uploading releases - ([0182533](https://github.com/orhun/git-cliff/commit/01825330d90a9399c9285b5a286b1d69aa1494e7))
- *(cd)* Remove the custom changelog template - ([d826b9d](https://github.com/orhun/git-cliff/commit/d826b9d2e5bdd30b132731ff6d1dc87748543ccb))
- *(cd)* Override the changelog template - ([41053fb](https://github.com/orhun/git-cliff/commit/41053fbe90a08648b70e5cca6a2504e94202bd06))
- *(cd)* Set the release body on linux - ([7623977](https://github.com/orhun/git-cliff/commit/76239771662bf342d742c12907619eece1bf946d))
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ WORKDIR app

# Even if the repository as marked as safe, GitHub Actions and some other
# environments insist on running the entrypoint as root inside the container
# even when being run by a non priviledged user on their own files. Here we
# even when being run by a non privileged user on their own files. Here we
# check the ownership of the workdir (which may or may not be /app) and change
# our effective user/group ID to match.
RUN cat <<'EOF' > /usr/local/bin/entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Learn how to use **git-cliff** from the [documentation](https://git-cliff.org/do

## Editor Support

- [git-cliff.el](https://github.com/liuyinz/git-cliff.el) - Genarate, update and release changelog in Emacs
- [git-cliff.el](https://github.com/liuyinz/git-cliff.el) - Generate, update and release changelog in Emacs

## Similar/Related Projects

Expand Down
3 changes: 3 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
# Check spelling of the commit with https://github.com/crate-ci/typos
# If the spelling is incorrect, it will be automatically fixed.
{ pattern = '.*', replace_command = 'typos --write-changes -' },
]
# regex for parsing and grouping commits
commit_parsers = [
Expand Down
2 changes: 1 addition & 1 deletion git-cliff-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repo = ["dep:git2", "dep:glob", "dep:indexmap"]
glob = { workspace = true, optional = true }
regex.workspace = true
log.workspace = true
thiserror = "1.0.49"
thiserror = "1.0.50"
serde = { version = "1.0.189", features = ["derive"] }
serde_json = "1.0.107"
serde_regex = "1.1.0"
Expand Down
6 changes: 6 additions & 0 deletions git-cliff-core/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ pub fn run(
if output.status.success() {
Ok(str::from_utf8(&output.stdout)?.to_string())
} else {
for output in [output.stdout, output.stderr] {
let output = str::from_utf8(&output)?.to_string();
if !output.is_empty() {
log::error!("{}", output);
}
}
Err(IoError::new(
IoErrorKind::Other,
format!("command exited with {:?}", output.status),
Expand Down
4 changes: 4 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

if ! command -v typos &>/dev/null; then
echo "typos is not installed. Run 'cargo install typos' to install it, otherwise the typos won't be fixed"
fi

if [ -z "$1" ]; then
echo "Please provide a tag."
echo "Usage: ./release.sh v[X.Y.Z]"
Expand Down
5 changes: 5 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[type.md]
extend-ignore-re = [
"\\[[[:xdigit:]]{7}\\]\\(https://github.com/orhun/git-cliff/commit/[[:xdigit:]]{40}\\)",
"\\[halp\\]\\(https://github.com/orhun/halp\\)",
]
6 changes: 3 additions & 3 deletions website/docs/templating/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ following context is generated to use for templating:
"commits": [
{
"id": "e795460c9bb7275294d1fa53a9d73258fb51eb10",
"group": "<type> (overrided by commit_parsers)",
"group": "<type> (overridden by commit_parsers)",
"scope": "[scope]",
"message": "<description>",
"body": "[body]",
Expand Down Expand Up @@ -124,8 +124,8 @@ If [`conventional_commits`](/docs/configuration#conventional_commits) is set to
"commits": [
{
"id": "e795460c9bb7275294d1fa53a9d73258fb51eb10",
"group": "(overrided by commit_parsers)",
"scope": "(overrided by commit_parsers)",
"group": "(overridden by commit_parsers)",
"scope": "(overridden by commit_parsers)",
"message": "(full commit message including description, footers, etc.)",
"conventional": false,
"links": [
Expand Down

0 comments on commit 0fababf

Please sign in to comment.