Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: draft of the --empty parameter #696

Closed
wants to merge 28 commits into from

Conversation

12rambau
Copy link
Contributor

@12rambau 12rambau commented Apr 5, 2023

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

noirbizarre and others added 27 commits March 2, 2023 18:57
Fixes commitizen-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.

Fixes commitizen-tools#495

BREAKING CHANGE: Plugins are now exposed as `commitizen.plugin` entrypoints
Reads version from the repository last tag matching `tag_format`

Fixes commitizen-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 <[email protected]>

* refactor(bump): version_provider rename to version_type; `pep` option rename to `pep440`

Signed-off-by: apkawa <[email protected]>

* docs(bump): add `version_type` info to config.md

Signed-off-by: apkawa <[email protected]>

* refactor(bump): to use VersionProtocol interface instead packaging.Version subclass

Signed-off-by: apkawa <[email protected]>

* test(bump): `VersionProtocol` workaround mypy for py==3.7

Signed-off-by: apkawa <[email protected]>

* fix(changelog): `changelog` command does not find version tag with `version_type=semver` option

Signed-off-by: apkawa <[email protected]>

* refactor: minor review fixes

* test(changelog): fix test_changelog_incremental_with_merge_prerelease issue with freeze_time

Signed-off-by: apkawa <[email protected]>

---------

Signed-off-by: apkawa <[email protected]>
@12rambau 12rambau changed the base branch from master to v3 April 19, 2023 08:13
@codecov
Copy link

codecov bot commented Apr 19, 2023

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     
Flag Coverage Δ
unittests 97.82% <93.54%> (-0.29%) ⬇️

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

Impacted Files Coverage Δ
commitizen/commands/bump.py 97.57% <87.50%> (-0.55%) ⬇️
commitizen/version_types.py 90.74% <90.74%> (ø)
commitizen/bump.py 100.00% <100.00%> (ø)
commitizen/changelog.py 99.49% <100.00%> (-0.51%) ⬇️
commitizen/cli.py 94.11% <100.00%> (ø)
commitizen/commands/changelog.py 98.91% <100.00%> (+0.02%) ⬆️
commitizen/defaults.py 100.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:v3 April 23, 2023 07:21
@woile woile closed this Apr 23, 2023
@12rambau
Copy link
Contributor Author

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

@woile
Copy link
Member

woile commented Apr 23, 2023

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
Contributor Author

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

@woile
Copy link
Member

woile commented Apr 23, 2023

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

Sign up for free to 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
7 participants