1
1
mirror of https://github.com/orhun/git-cliff.git synced 2025-01-07 13:28:37 +03:00
Commit Graph

126 Commits

Author SHA1 Message Date
Orhun Parmaksız
b55e678a4e
chore(project): update MSRV to 1.60.0 2022-08-16 20:29:04 +02:00
Orhun Parmaksız
72b8ba7a43
chore(deps): upgrade dependencies 2022-08-16 20:27:51 +02:00
Orhun Parmaksız
1b13b97f73
refactor(commit): use a more concise conversion for string 2022-08-16 01:10:06 +02:00
Orhun Parmaksız
940065b575
feat(commit): add commit author and committer to the context (#100) 2022-08-16 01:04:56 +02:00
Orhun Parmaksız
d453d4cbeb
feat(changelog): support setting commit SHA while using --with-commit 2022-08-12 20:47:51 +02:00
Orhun Parmaksız
1b5dcc1051
refactor(clippy): run clippy for tests 2022-08-12 11:51:38 +02:00
Aaron Friel
e3eae33abc
feat(changelog): support splitting commits by lines (#101)
* feat: support splitting commits by lines

* refactor(config): update the description for split_commits

* style(fmt): apply formatting via rustfmt

* refactor(test): create helper method for split_commits test

* fix(changelog): change the default behaviour for split_commits when it is not provided

* test(fixture): add test fixture for splitting commits

* docs(readme): update table of contents

* docs(readme): add warning about split_commits flag

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-08-12 04:59:06 +03:00
Orhun Parmaksız
7fdcf4df01
chore(release): prepare for v0.8.1 2022-07-12 18:13:24 +02:00
Orhun Parmaksız
f792a925e1
chore(release): prepare for v0.8.0 2022-07-12 15:21:32 +02:00
Orhun Parmaksız
c7265e1214
chore(deps): upgrade dependencies 2022-07-12 15:16:33 +02:00
Eliza Weisman
0bf499ec94
feat(commit)!: pass footer token and separator to template (#97)
* fix(commit): pass footer token and separator to template

Currently, when a conventional commit has footers, only the footers'
values (the part after the separator token, such as `:`) are passed to
the template. This means that when multiple footers, such as
`Signed-off-by:` and `Co-authored-by:` are present, it isn't currently
possible for the template to determine the name of the footer. This
makes actually using data from footers in templates impractical in most
cases.

This commit fixes this by changing the `Serialize` impl for `Commit` to
pass the commit's footers as a structured object rather than a string.
The structured `Footer` type includes the footer's token (which is what
`git_conventional` calls the name preceding the separator token), the
separator, and the value.

I didn't make the new `Footer` type and `Commit::footers` method public,
because it isn't strictly necessary to add them to the `git-cliff-core`
public API to fix this issue. However, we can make them public in a
follow-up PR if this is considered useful.

Fixes #96

BREAKING CHANGE:

This changes type of the `commit.footers` array exposed to templates.
Currently, when a template uses `commit.footers`, it can treat the
values as strings. After this change, the footer object will need to
have its fields unpacked in order to use them.

However, the impact of this breakage is probably not that severe, since
it's not really practical to use footers in templates with the current
system.

* docs(README): discuss footers in README

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* docs(examples): Add footers to `detailed.toml`

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* refac(commit): address review feedback

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* docs(README): address README review feedback

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

* refactor(example): update detailed example about newline issues

* test(fixture): add test fixture for commit footers

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-07-12 15:38:16 +03:00
Orhun Parmaksız
34270c8605
refactor(clippy): apply clippy suggestions 2022-07-03 16:45:51 +02:00
Orhun Parmaksız
be9e15873b
chore(deps): update tera to 1.16.0 (#70) 2022-06-23 08:54:29 +02:00
Ömer Faruk Şahin
e22076843b
feat(config): support changing commit scope with commit_parsers (#94)
* fix: issue #50

* chore: Check some lints and styles

* docs: add scope example

* chore: fix some typos in cargo docs

* style: rerun cargo fmt and cargo lint

* style(config): update wording in the comment

* test(config): add tests about specifying the scope

* test(fixture): add test fixture for custom scope

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-06-23 02:44:13 +03:00
Orhun Parmaksız
7d0786ca55
feat(changelog): support external commands for commit preprocessors (#86) 2022-06-08 01:44:10 +03:00
Orhun Parmaksız
8d8981c6b1
refactor(clippy): apply clippy suggestions 2022-05-29 11:15:45 +03:00
Orhun Parmaksız
bfcd0d97ba
chore(project): set MSRV to 1.58.1 (#87) 2022-05-08 02:18:03 +03:00
Orhun Parmaksız
bb6645ad06
chore(release): prepare for v0.7.0 2022-04-24 14:57:26 +03:00
Orhun Parmaksız
b400690a1f
chore(deps): upgrade dependencies 2022-04-24 14:33:36 +03:00
Orhun Parmaksız
f2ccdc3669
chore(deps): upgrade git-conventional dependency (#82) 2022-04-15 17:23:12 +03:00
Orhun Parmaksız
64317f2116
feat(git): support preprocessing commit messages using regex (#62) 2022-04-06 15:46:23 +03:00
Orhun Parmaksız
f48d2077c3
feat(config): support placing configuration inside Cargo.toml (#46) 2022-03-27 15:42:33 +03:00
Orhun Parmaksız
95ad55d542
feat(args): add --context flag for outputting context (#71) 2022-03-27 00:38:08 +03:00
Orhun Parmaksız
b0201c458e
chore(release): prepare for v0.6.1 2022-03-13 15:53:12 +03:00
Marco Ieni
d68eb120c0
docs(core): document timestamp format of Release struct (#67) 2022-03-13 15:48:49 +03:00
Orhun Parmaksız
66f65800b3
chore(deps): upgrade dependencies 2022-03-13 15:45:37 +03:00
Orhun Parmaksız
8dc367fdf9
chore(deps): upgrade regex dependency to fix CVE-2022-24713 2022-03-13 13:33:58 +03:00
Orhun Parmaksız
761669eb57
chore(release): prepare for v0.6.0 2022-02-12 22:06:37 +03:00
Orhun Parmaksız
58165c730e
fix(tests): update custom error tests 2022-02-12 21:52:32 +03:00
Orhun Parmaksız
4863e946c0
chore(deps): upgrade dependencies 2022-02-12 21:50:01 +03:00
Kenji Miyake
a3980f4632
feat(changelog, config)!: replace --topo-order by --date-order (#58)
* feat(changelog, config)!: replace --topo-order by --date-order

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* ci: simplify test-fixtures workflow

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* ci: add fixtures tests of topo_order and date_order

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove unnecessary checkout

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove cargo run

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* set GIT_COMMITTER_DATE for each commit

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* add a test for --date-order arg

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix git config style

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove an unnecessary period

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* apply #60

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* minify the config files for tests

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix git config style

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix styles of expected.md

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* make some steps one-line

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove footers

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove newlines

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Revert "remove newlines"

This reverts commit 802881523f.

* Revert "remove footers"

This reverts commit 3d334cc9ef.

* add trim and footer

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
2022-02-12 19:30:21 +03:00
Orhun Parmaksız
e1da61150f
feat(changelog)!: use conventional commit body to check against commit parsers 2022-02-05 16:42:28 +03:00
Orhun Parmaksız
25959529d6
fix(config): lower the priority of global configuration file (#51) 2022-02-04 01:35:55 +03:00
Marcin Puc
bedabc93dd
refactor(lib): unify serde and serde_derive using derive feature (#57) 2022-02-01 01:19:33 +03:00
Orhun Parmaksız
8bb48b09ef
fix(test): update tests about optional config values 2022-01-17 01:30:33 +03:00
Orhun Parmaksız
e02ae0b366
feat(config): make the changelog section optional (#45) 2022-01-17 01:18:23 +03:00
Orhun Parmaksız
8202e37dbd
feat(config): make the git section optional (#45) 2022-01-17 01:14:34 +03:00
Orhun Parmaksız
cd018e90a1
refactor(clippy): apply clippy suggestions 2021-12-31 21:27:52 +03:00
Pascal Bach
b88e7d30be
feat(changelog): add link_parsers for parsing/extracting links (#42)
* feat(core): add link parsing

Searches for patterns in commite messages and allows to convert them into
links via regular expression replacement.

This allows to include links to issue trackers and other tools in the resulting
changelog.

Closes #41

* fix(ci): update lychee arguments

* docs(readme): fix typos

* docs(readme): fix typos

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2021-12-31 21:10:37 +03:00
Orhun Parmaksız
d23cf22d49
chore(release): prepare for v0.5.0 2021-12-16 00:28:09 +03:00
Orhun Parmaksız
8445313b13
feat(changelog): support having both conventional and unconventional commits in the changelog 2021-12-11 15:07:10 +03:00
Orhun Parmaksız
1a9c3e310f
feat(template): use more explanatory error messages about templates 2021-12-08 23:12:13 +03:00
Kenji Miyake
de11ccecac
feat(config): add ignore_tags option (#40)
* feat: add ignore_tags option

Resolves (#36)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* test: add a test using GitHub Actions

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* docs: fix style

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* chore: add ignore_tags to example config files

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* style: refactor test-fixtures workflow

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
2021-12-07 21:49:37 +03:00
Orhun Parmaksız
02a6187a58
feat(args): add --current flag for processing the current tag (#37) 2021-12-02 10:01:10 +03:00
Orhun Parmaksız
9d213f5713
fix(tests): update log test about exclude path 2021-12-01 22:52:22 +03:00
Orhun Parmaksız
25a1d49c09
feat(args): add --exclude-path argument for excluding related commits 2021-12-01 22:50:12 +03:00
Orhun Parmaksız
edb343a10e
feat(args): support multiple values for --commit-path argument 2021-11-30 16:31:19 +03:00
Orhun Parmaksız
ad11cbf6c5
feat(args): accept glob patterns for --commit-path argument 2021-11-30 16:05:29 +03:00
Orhun Parmaksız
6cec37d1ec
refactor(config): rename the config value for commit order 2021-11-25 22:52:10 +03:00
Orhun Parmaksız
4eb334da06
feat(config): support specifying the sorting methods in config (#31) 2021-11-25 22:45:44 +03:00