Skip to content

feat: draft of the --empty parameter - #696

Closed
12rambau wants to merge 28 commits into
commitizen-tools:v3from
12rambau:devrelease
Closed

feat: draft of the --empty parameter#696
12rambau wants to merge 28 commits into
commitizen-tools:v3from
12rambau:devrelease

Conversation

@12rambau

@12rambau12rambau commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

Description

First draft of a new feature. The idea is to grant the user the capability to run cz bump without prior commits. The reasons are described in the associated issue.

here we add an --empty parameter to the bump method
when this parameter is set and if no increment is find, a automatic "PATCH" is released.

I'll wait for your feedback before working on tests and documentation.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Additional context

Fix#662

noirbizarreand others added 27 commits March 2, 2023 18:57
Fixescommitizen-tools#607
BREAKING CHANGE: Python 3.6 is not officially supported anymore. Please migrate from 3.6 to 3.7 or greater.
…n loading
Plugins are now loaded using the `commitizen.plugin` entrypoint
while legacy plugin are not loaded anymore but a warning is raised when one is seen.
Fixescommitizen-tools#495
BREAKING CHANGE: Plugins are now exposed as `commitizen.plugin` entrypoints
Reads version from the repository last tag matching `tag_format`
Fixescommitizen-tools#641
Topological ordering should be used when ordering commits in changelog history.
This allows commits to be shown properly in the order they were added to the codebase,
even if non-linear merges were used
…mmit-order
fix(commands/changelog): use topological order for commit ordering
Running tests concurrently can cause temporary files, such as the file
used to backup the commit message, to be deleted by one test but
accessed by another test later on.
…lease
feat(changelog): add merge-prerelease flag
…-tools#686)
* feat(bump): version_provider=semver optional option to make version compatible with semver
Signed-off-by: apkawa <apkawa@gmail.com>
* refactor(bump): version_provider rename to version_type; `pep` option rename to `pep440`
Signed-off-by: apkawa <apkawa@gmail.com>
* docs(bump): add `version_type` info to config.md
Signed-off-by: apkawa <apkawa@gmail.com>
* refactor(bump): to use VersionProtocol interface instead packaging.Version subclass
Signed-off-by: apkawa <apkawa@gmail.com>
* test(bump): `VersionProtocol` workaround mypy for py==3.7
Signed-off-by: apkawa <apkawa@gmail.com>
* fix(changelog): `changelog` command does not find version tag with `version_type=semver` option
Signed-off-by: apkawa <apkawa@gmail.com>
* refactor: minor review fixes
* test(changelog): fix test_changelog_incremental_with_merge_prerelease issue with freeze_time
Signed-off-by: apkawa <apkawa@gmail.com>
---------
Signed-off-by: apkawa <apkawa@gmail.com>
@12rambau
12rambau changed the base branch from master to v3April 19, 2023 08:13
@codecov

codecovBot commented Apr 19, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 93.54% and project coverage change: -0.29⚠️

Comparison is base (e34de55) 98.11% compared to head (acc3485) 97.82%.

Additional details and impacted files
@@ Coverage Diff @@## v3 #696 +/- ##
==========================================
- Coverage 98.11% 97.82% -0.29% 
==========================================
Files 41 42 +1 Lines 1855 1934 +79 ==========================================
+ Hits 1820 1892 +72 - Misses 35 42 +7 
FlagCoverage Δ
unittests97.82% <93.54%> (-0.29%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted FilesCoverage Δ
commitizen/commands/bump.py97.57% <87.50%> (-0.55%)⬇️
commitizen/version_types.py90.74% <90.74%> (ø)
commitizen/bump.py100.00% <100.00%> (ø)
commitizen/changelog.py99.49% <100.00%> (-0.51%)⬇️
commitizen/cli.py94.11% <100.00%> (ø)
commitizen/commands/changelog.py98.91% <100.00%> (+0.02%)⬆️
commitizen/defaults.py100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@woile
woile deleted the branch commitizen-tools:v3April 23, 2023 07:21
@woilewoile closed this Apr 23, 2023
@12rambau

Copy link
Copy Markdown
ContributorAuthor

any specific reason why this PR was removed ? is the --empty parameter a no-go ?

@woile

Copy link
Copy Markdown
Member

I apologize, I don't know why it was closed (and it doesn't let me open it again). Please feel free to open a new one

@12rambau

Copy link
Copy Markdown
ContributorAuthor

Let me base it directly on v3 it will everyone's life easier

@woile

Copy link
Copy Markdown
Member

Everything is in master again, open a new pr to master (which has V3 now)

@12rambau12rambau mentioned this pull request Apr 24, 2023
4 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create a dev bump straight after a normal bump

6 participants

@12rambau@woile@noirbizarre@Lee-W@sacha-c@Apkawa