1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-09-11 15:05:30 +03:00
Commit Graph

43 Commits

Author SHA1 Message Date
Cyclonit
9fc12bb90c
feat(changelog): make changelog.header a template (#698)
* feat(changelog): make changelog.header a template (#697)

* refactor: clean up implementation

* docs: update the description of header field

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-06-17 20:43:00 +03:00
Alexander
6a9feba98f
chore(example): allow using github template without github variables (#672)
* fix(659) fix default template

* chore: fix spacing issues

* chore: add space

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-06-03 11:22:41 +03:00
Alexander Dupuy
8b3d09f776
fix(config): drop extra '(' in first commit URL in github-keepachangelog (#535) 2024-03-05 17:05:21 +01:00
Orhun Parmaksız
110b9b8d26
fix(config): fix commit parser regex in the default config
fixes #519
2024-02-28 20:22:57 +03:00
Orhun Parmaksız
7f891602e4
chore(config): skip dependabot commits for dev updates 2024-02-17 19:38:17 +03:00
Orhun Parmaksız
9500bf8ef8
chore(config): revamp the configuration files 2024-02-17 16:36:44 +03:00
Orhun Parmaksız
a521891b55
chore(example): use full links in GitHub templates (#503) 2024-02-17 13:39:03 +01:00
Orhun Parmaksız
6f32f3376e
feat(template): support using PR title in the GitHub template (#418)
* feat(template): support using PR title in the GitHub template

* refactor(test): add PR title to the tests
2023-12-31 15:34:51 +01:00
Orhun Parmaksız
5238326790
feat(github)!: support integration with GitHub repos (#363)
See <https://git-cliff.org/docs/integration/github>

Squashed history:
* feat(github): support integration with GitHub repos
* fix(changelog): fix generation logic
* refactor(github): use verbose logging for errors
* fix(test): update tests accordingly to the render parameters
* feat(github): support deriving upstream URL from the repo
* docs(lib): update the description of the error module
* chore(github): add disclaimer for the github feature
* chore(config): filter the contributors in the github example
* fix(github): make GitHub login field optional
* chore(github): increase the logging verbosity for remote info
* refactor(git): reduce the log level for upstream remote
* feat(github): log the request error
* feat(args): add `--github-repo` argument
* feat(github): add caching for network requests
* feat(github): add progress bar for the network requests
* refactor(github): gate the implementation behind github feature flag
* fix(github): use the local cache for HTTP requests
* feat(github): set TCP keepalive value for HTTP client
* chore(cargo): create update-informer feature
* docs(website): add documentation about available features
* docs(website): reorder installation sections
* fix(config): skip serializing secret
* docs(website): add documentation about GitHub integration
* chore(example): update the style of GitHub config
* docs(website): add github example
* test(fixture): add test fixture for GitHub integration
* test(fixture): run the GitHub integration test
* fix(changelog): print header before fetching GitHub
* feat(github): allow using remote values without fetching GitHub
* chore(example): simplify Keep a Changelog example
* feat(example): add github-keepachangelog example
* chore(example): update the examples in default config
* chore(ci): test all features
* test(github): add unit tests for GitHub integration
* chore(ci): set upstream remote for tests
* chore(ci): show the current git status for test step
* chore(ci): skip git upstream test
* chore(ci): run tests without default features
* chore(ci): skip test with full name
* docs(website): add note about github-keepachangelog format
* chore(ci): skip the faulty git test for all test steps
* refactor(error): update the error type for logger
2023-12-26 20:52:31 +01:00
Orhun Parmaksız
8e1e0d73c3
chore(example): remove limited commits example 2023-12-20 18:43:31 +03:00
Orhun Parmaksız
0945fa806c
feat(changelog)!: support templating in the footer (#369)
* feat(changelog)!: support templating in the footer (#95)

* test(fixture): run test-footer-template fixture
2023-12-05 22:23:09 +01:00
Orhun Parmaksız
8edec7fd50
refactor(config): remove unnecessary newline from configs 2023-11-14 17:09:30 +03:00
Orhun Parmaksız
2c621f71e6
chore(config): update tag_pattern value for backwards compatibility 2023-10-29 13:53:59 +01:00
Orhun Parmaksız
596fd4d14d
docs(config): update the comment for tag_pattern 2023-10-29 13:47:09 +01:00
Jean SIMARD
3c2fb60726
feat(config)!: support regex in 'tag_pattern' configuration (#318)
resolves #289

BREAKING CHANGE: `tag_pattern` now takes a valid regular expression instead of a glob pattern
2023-10-29 13:05:38 +01:00
Dominik Nakamura
890de0007e
docs: update Tera links to the new URL (#272)
The Tera website changed from Netlify to GitHub Pages, with the old
Netlify deployment gone. Therefore, all links to Tera should point to
the new URL.
2023-09-08 15:22:14 +02:00
Alexander González
aad4222986
fix(examples): add missing newline (#253) 2023-08-24 19:45:29 +02:00
Orhun Parmaksız
b7457785e6
chore(config): add additional parsers for default config 2023-08-19 14:50:01 +03:00
Orhun Parmaksız
0bf5ebe79b
docs(example): update the header of configuration examples 2023-08-19 13:38:07 +03:00
Orhun Parmaksız
e1cf26e2a5
docs(example): add example for generating changelog similar to cocogitto 2023-08-19 13:35:44 +03:00
Orhun Parmaksız
e9aa9918b6
style(config): apply formatting to configuration files 2023-08-14 00:43:41 +03:00
Orhun Parmaksız
77731ec7ae
feat(changelog, config)!: replace --date-order by --topo-order 2022-12-16 18:43:13 +01:00
Florian Fromm
0c7769b52f
feat(config): changelog for the last n commits (#116)
* feat(config): changelog for the last n commits

Adds a additional configuration variable `limit_commits` to the
configuration struct.
`limit_commits` can be set to a positive integer number to limit the
commits contained in the generated changelog.

Also adjusts the default config file to contain `limit_commits` as a
commented out line.

Extends documentation in README.md to also cover the introduced
configuration value.

issue: https://github.com/orhun/git-cliff/issues/102

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

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-10-06 13:10:37 +02:00
Sebastian Müller
1c98995454
feat(changelog): do not skip breaking changes if configured (#114)
* feat(changelog): breaking changes are never skipped

Fixes #106

* test(fixture): add test fixture for skipping breaking changes

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-10-04 20:21:49 +00: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
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
Marco Ieni
9b5f0bb5fd
fix(example): fix keepachangelog config example (#66)
* chore: fix `keepachangelog` config example

* docs(readme): update keepachangelog example

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-03-13 13:30:57 +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
Kenji Miyake
0293b28109
style(changelog): comply with MD022 and fix minor typos (#61)
* style: add newlines after the title to comply with MD022

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

* style: replace whitespaces with whitespace

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
2022-02-08 18:11:11 +03:00
Orhun Parmaksız
848d8a587e
docs(config): add minimal example 2022-01-29 18:53:26 +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
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
4eb334da06
feat(config): support specifying the sorting methods in config (#31) 2021-11-25 22:45:44 +03:00
orhun
e444615c02
fix(config): remove only the leading "v" from tags (#18) 2021-09-28 01:10:05 +03:00
orhun
428d407df5
style(config): fix the newline issues in scoped-sorted example 2021-09-21 16:38:37 +03:00
Matt Foxx
05584b614a
docs(config): Add scope-sorted example (#16)
* Same as basic example but sorts commit by sorted scope
* Defaults to "No Category" if no scope found on commit
* Adds a nested bullet for breaking change description
2021-09-21 16:17:39 +03:00
orhun
0d793ad9db
docs(config): update the default regex in scoped config example 2021-09-08 21:58:29 +03:00
Steven L
8a18e4d48d
fix(config): fix default regexes and references in docs (#7)
* Fix default regexes and references in docs

* correction: I didn't realize the colon was necessary

* change more tomls, fmt

* rebase fixes
2021-09-08 21:40:29 +03:00
orhun
b5df656e61
feat(changelog): support parsing the missing scopes with default_scope (#8) 2021-09-07 00:23:08 +03:00
orhun
1f85263f84
fix(template): use 7 digits for short SHA 2021-08-03 00:33:21 +03:00
orhun
ed010be74f
fix(example): remove symbolic link 2021-08-03 00:27:07 +03:00
orhun
ee377cc42d
fix(example): update symbolic link to the default config 2021-08-03 00:23:32 +03:00
orhun
a406158608
docs(readme): add examples for templating 2021-08-03 00:21:05 +03:00