1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-09-17 10:17:07 +03:00
Commit Graph

34 Commits

Author SHA1 Message Date
Orhun Parmaksız
9eb3d65945
feat(config): support detecting config from project manifest (#571)
* feat(config): support detecting config from project manifest

* refactor: apply clippy suggestions

* test(fixture): add fixture for configuring from Cargo.toml
2024-03-23 15:31:58 +01:00
Jarosław Surkont
152414cb81
feat(release): make the bump version rules configurable (#530)
closes #447

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-03-11 14:08:07 +01:00
Orhun Parmaksız
292723109f
chore(fixtures): enable verbose logging for output 2024-03-02 21:41:49 +03:00
Orhun Parmaksız
b4e7a3400f
feat(args): add --tag-pattern argument (#526)
* feat(args): add `--tag-pattern` argument

* fix: fix typo in the fixture name

* test: update fixture case
2024-03-01 23:09:15 +01:00
Orhun Parmaksız
7ae77ff0e0
feat(args): add --no-exec flag for skipping command execution (#458)
* feat(args): add `--no-exec` flag for skipping command execution

* refactor(args): reorder arguments
2024-01-20 23:33:49 +01:00
Orhun Parmaksız
faa00c6e6c
feat(changelog): improve skipping via .cliffignore and --skip-commit (#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
2023-12-31 15:34:01 +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
f635bae964
test(fixtures): update the bumped value output to add prefix 2023-12-26 04:51:54 +03:00
Tiago Santos
44c93b7c70
fix(changelog): fix previous version links (#364)
* test: add more tests for previous links

* fix: fix wrong previous version

* test: fix wrong tag on test fixture

* test: add fixture for bump with keep a changelog links

* perf: avoid setting previous if already set

* style: remove unused comment

* refactor: change code style for readability

* fix: fix compilation failure

* docs: update with comments

* style: reformat code

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-12-10 16:37:00 +01:00
Orhun Parmaksız
19e65c25b3
feat(parser): support using regex scope values (#372)
closes #371
2023-12-07 19:25:27 +01:00
Orhun Parmaksız
991a035e0e
test(fixture): update the date for example test fixture 2023-12-06 21:29:58 +03:00
Orhun Parmaksız
82907693c1
docs(fixtures): add instructions for adding new fixtures 2023-12-06 21:25:17 +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
Marco Napetti
5e01e4c775
feat(args): allow returning the bumped version (#362)
* feat: allow returning bumped version

* refactor(args): polish bumped-version implementation

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-12-04 20:09:54 +01:00
Orhun Parmaksız
c94cb6a37a test(fixture): add test fixture for bumping version 2023-12-03 17:03:58 +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
Orhun Parmaksız
e9aa9918b6
style(config): apply formatting to configuration files 2023-08-14 00:43:41 +03:00
Tiago Santos
0a6ed62f57 test: fix keep a changelog test case 2023-06-25 23:52:37 +01:00
Tiago Santos
f5d3365226 test: fix keep a changelog test case 2023-06-25 23:48:15 +01:00
Tiago Santos
fbb605e4f6 fix: fix previous release references 2023-06-25 23:12:20 +01:00
Orhun Parmaksız
29b3dd1598
fix(fixtures): fix test fixture failures 2022-12-16 21:08:31 +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
Ö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
2b484f078c
fix(fixtures): update expected changelog date 2022-04-06 15:58:28 +03:00
Orhun Parmaksız
64317f2116
feat(git): support preprocessing commit messages using regex (#62) 2022-04-06 15:46:23 +03:00
Kenji Miyake
3ccec7f93a
fix(changelog): use root commit when --latest and there is only one tag (#59)
* test: add a test for --latest with one tag

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

* chore: add a test script

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

* fix: use root commit when --latest and there is only one tag

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

* docs: remove "requires at least 2 tags"

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

* add newlines

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

* apply review to test-fixtures-locally.sh

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

* apply review to lib.rs

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

* chore(fixtures): apply shellcheck suggestion

* chore(ci): checkout pull request HEAD commit

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-02-20 17:26:11 +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
92a54d67b8
chore(fixtures): improve the workflow for test fixtures 2021-12-07 23:15: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