diff --git a/CHANGELOG.md b/CHANGELOG.md index f2e6fa4fe0..0daacbe257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ +## Unreleased +### Fix +- **changelog**: sort the commits properly to their version -## v1.19.1 +## v1.19.1 (2020-05-03) ### Fix @@ -12,7 +15,7 @@ - **cli**: add explicit category for deprecation warnings -## v1.19.0 +## v1.19.0 (2020-05-02) ### Fix @@ -24,11 +27,6 @@ - **changelog**: add support for any commit rule system - **changelog**: add incremental flag -### Refactor - -- **changelog**: use functions from changelog.py -- **changelog**: rename category to change_type to fit 'keep a changelog' - ## v1.18.3 (2020-04-22) ### Refactor @@ -40,6 +38,8 @@ ### Refactor - **git**: replace GitCommit.message code with one-liner +- **changelog**: use functions from changelog.py +- **changelog**: rename category to change_type to fit 'keep a changelog' - **templates**: rename as "keep_a_changelog_template.j2" - **templates**: remove unneeded __init__ file - **cli**: reorder commands @@ -175,20 +175,20 @@ ### Refactor - **tests/commands/bump**: use tmp_dir to replace self implemented tmp dir behavior +- **git**: make find_git_project_root return None if it's not a git project +- **config/base_config**: make set_key not implemented +- **error_codes**: move all the error_codes to a module +- **config**: replace string type path with pathlib.Path - **test_bump_command**: rename camel case variables - **tests/commands/check**: use pytest fixture tmpdir replace self implemented contextmanager - **test/commands/other**: replace unit test style mock with mocker fixture - **tests/commands**: separate command unit tests into modules - **tests/commands**: make commands related tests a module -- **git**: make find_git_project_root return None if it's not a git project -- **config/base_config**: make set_key not implemented -- **error_codes**: move all the error_codes to a module -- **config**: replace string type path with pathlib.Path ### Fix -- **cli**: fix --version not functional - **git**: remove breakline in the return value of find_git_project_root +- **cli**: fix --version not functional ### Feat @@ -298,10 +298,10 @@ - **config**: add deprecation warning for loading config from ini files - **cz/customize**: add jinja support to enhance template flexibility - **cz/filters**: add required_validator and multiple_line_breaker -- **Commands/commit**: add ´--dry-run´ flag to the Commit command - **cz/cz_customize**: implement info to support info and info_path - **cz/cz_customize**: enable bump_pattern bump_map customization - **cz/cz_customize**: implement customizable cz +- **Commands/commit**: add ´--dry-run´ flag to the Commit command - new 'git-cz' entrypoint ### Refactor @@ -512,10 +512,6 @@ ## v0.9.2 (2017-11-11) -### Refactor - -- **renamed conventional_changelog to conventional_commits, not backward compatible**: - ## v0.9.1 (2017-11-11) ### Fix diff --git a/commitizen/commands/changelog.py b/commitizen/commands/changelog.py index 12f43f775d..0d6f8bb426 100644 --- a/commitizen/commands/changelog.py +++ b/commitizen/commands/changelog.py @@ -77,7 +77,7 @@ def __call__(self): if latest_version: start_rev = self._find_incremental_rev(latest_version, tags) - commits = git.get_commits(start=start_rev) + commits = git.get_commits(start=start_rev, args="--author-date-order") if not commits: out.error("No commits found") raise SystemExit(NO_COMMITS_FOUND) diff --git a/commitizen/git.py b/commitizen/git.py index 227f6c51a3..76abb17ade 100644 --- a/commitizen/git.py +++ b/commitizen/git.py @@ -46,7 +46,7 @@ def tag(tag: str): return c -def commit(message: str, args=""): +def commit(message: str, args: str = ""): f = NamedTemporaryFile("wb", delete=False) f.write(message.encode("utf-8")) f.close() @@ -61,11 +61,12 @@ def get_commits( *, log_format: str = "%H%n%s%n%b", delimiter: str = "----------commit-delimiter----------", + args: str = "", ) -> List[GitCommit]: """ Get the commits betweeen start and end """ - git_log_cmd = f"git log --pretty={log_format}{delimiter}" + git_log_cmd = f"git log --pretty={log_format}{delimiter} {args}" if start: c = cmd.run(f"{git_log_cmd} {start}..{end}")