-
-
Notifications
You must be signed in to change notification settings - Fork 301
fix(bump): raise non zero error code when there's no elegible commit to bump #473
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
Conversation
Codecov Report
@@ Coverage Diff @@ ## master #473 +/- ## ======================================= Coverage 98.04% 98.04% ======================================= Files 39 39 Lines 1431 1431 ======================================= Hits 1403 1403 Misses 28 28
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I think I see the side effect of this. Now the pipelines throw an error when no change is found.
But I guess is an edge we have to properly polish
yep, after a second thought, this could be a problem. but i've not yet get a better idea
look like we'll need to handle it on our side as well 🤔
maybe we'll need to add documentation for it?
https://github.com/commitizen-tools/commitizen/runs/4960945320?check_suite_focus=true
I'm starting to think that I made a mistake here by using the same error code.
On one hand you have new commits that you expect to be ignored (those commits starting with things like docs
, ci
, etc).
And on the other hand, you have the "no commits" situation, where the pipeline is triggered and there's no new commits (this is probably because of a bad CI design, like triggering the pipeline when a new PR is made).
Maybe we can change the error code for this and introduce a new flag: --no-raise
with error codes.
It would terminate the program but with error code 0
.
Example:
cz bump --no-raise 3,5,8
That would make it quite flexible, no?
Yep! Sounds like a great solution! I was using $?
in Makefile to decide whether I should ignore the error on other projects. Wondering if --no-raise
is used in other project 🤔 Also, I think it might be great if we could support string input as well.
e.g.,
cz [any operation] --no-raise NO_COMMITS,NO_BUMP
or should we go with
cz [any operation] --no-raise NO_COMIITS --no-raise NO_BUMP
I have no strong preference between these 2. Or we could support both? 🤔
I just create an issue for this #485. let's discuss there 💪
Description
See error in commitizen-tools/commitizen-action#18
Checklist
./script/format
and./script/test
locally to ensure this change passes linter check and test(削除) Update the documentation for the changes (削除ここまで)Expected behavior
An error code should be returned when the bump can not succeed
Steps to Test This Pull Request
Clone this repo https://github.com/now8-org/app
and run
cz bump
Additional context