-
Notifications
You must be signed in to change notification settings - Fork 27
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
Check
returns empty commit message
in version 0.3.13
#102
Comments
There is a change in behavior. When stdin is not a terminal, it will read from stdin. see f53b02c. $ convco --version && convco check
convco 0.3.13
FAIL 38be02d wrong type: doc doc: clarify cmake is needed to build
FAIL 8c4dbb6 wrong type: doc doc: improve gitlab section in `README.m...
FAIL ffcf34a scope does not match regex: changelog|check|commit|version ci(docker): Add a dockerfile
FAIL 724bb2b first line doesn't match `<type>[optional scope]: <description>` release v0.3.0
FAIL 155e652 scope does not match regex: changelog|check|commit|version build(deps): bump versions
5/167 failed |
When running in docker there is indeed a change in behaviour. You have to add the flag
|
I see this issue is happening in github actions too as it seems not to open a tty. https://github.com/convco/convco/actions/runs/3914150434/jobs/6690889112 |
One solution is to use
I also added a check to validate if some rev is specified to check. if it is, it will not read from stdin. |
@erica-edholm v0.3.14 has been released. Can you confirm the issue is solved. If you run |
We are running convco check in Jenkins as I saw the point in the changelog, but did not expect my workflow/use to change and break. The commit message describes it as
I do not expect behavior change for existing use from that. The release notes did not warn about potential breakage either. The commit message does not make it clear to me that there are differences, the intention, or alternatives are; it only broadly describes a new use case (piping into convco check). Is there a description of how it is supposed to work now? Only stdin? Supposed to auto detect one or the other use, but that check is faulty/broken? |
As this is a pre-major release anything can change. I try to do my best to not introduce breaking changes, but this one was unexpected. I propose to pin to v0.3.12 for the time being.
As you run it with Jenkins, I guess no tty is available. There is still a bug I need to fix.
update: with this change you will have to set |
Ok, we will stay on v0.3.12 for now. Thank you for your efforts. I hope my comment did not come off too harshly. You've always been very responsive and worked through issues in a timely manner. You're right it's a 0 version, so I guess I should not expect consistent stability. |
No it is fine. I understand breaking a workflow is not nice. |
I released v0.3.15 which should contain the fix to this issue. |
v0.3.15 I would expect If I have a commit range But without passing a rev, I still get the 'empty commit message' failure in Jenkins. |
This is documented:
|
ok I still find the behavior depending on the environment a questionable decision, and the resulting behavior confusing. Writing down the default behavior without arguments
I don't get why check would be wanted to behave different when not in a tty. If I were deciding on this I'd need very strong reasons for introducing this inconsistent behavior. With a reasonable alternative of a parameter for git hooks (#100 suggested But I can be explicit with the argument in my use to get consistent behavior across environments. related note: tty may be terminology not familiar to users (I think it depends on users being familiar in the cli linux and server administration specifically?) |
|
commitlint has the same behaviour:
|
I think the tty vs notty is the only undesirable (fragile) part. I have not played with it myself, so please excuse if I misunderstand the current behavior. I authored |
that's only half "the same behavior"; it's not the same condition, it does not document anything about runtime environment (tty or not) as condition; only parameters to my understanding, it specifically does not follow the behavior I am criticizing. |
@hdevalke sorry for being MIA for three weeks, I hadn't checked my github notifications 🙈 Thanks for the explanation. It was indeed inside GHA that we first encountered the issue, but also locally for some reason. |
Actually, after talking to my colleague I realized that the command that failed was
Thank you again for the quick response (even if I was so slow getting back to you, sorry about that!) |
No problem, thank you for reporting the issue. #116 will introduce the |
Describe the bug
The command
convco check
started returnempty commit message
in version 0.3.13. When running the same command with version 0.3.12 the tool finds the commit, and validates it properly. I haven't found any documentation about any behavior change with thecheck
command, hence this bug report.To Reproduce
Steps to reproduce the behavior:
convco --version
convco check
empty commit message
Expected behavior
Expect output to be the same as with version 0.3.12, i.e:
System (please complete the following information):
Additional context
Not sure if this is a bug or an actual change of behavior, couldn't find any changes in the documentation though, so I assume that it indeed a bug. If this behavior change is as intended, it would be good to update the documentation and then you can just close this bug.
The text was updated successfully, but these errors were encountered: