-
Notifications
You must be signed in to change notification settings - Fork 934
Using same commit for --from and --to does nothing and returns exit-code=0 (success) #3376
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
Open
2 of 4 tasks
Labels
Comments
This comment was marked as outdated.
This comment was marked as outdated.
#2568 is related |
This comment was marked as outdated.
This comment was marked as outdated.
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 12, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 12, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 12, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 12, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 12, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 12, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 13, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 13, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 13, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 13, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 13, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 13, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 14, 2024
Mersho
added a commit
to Mersho/commitlint
that referenced
this issue
Feb 14, 2024
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using same commit hash for
--from
and--to
flags makes commitlint do nothing and return exit-code=0 (success).Steps to Reproduce
<commitHash>
--to<commitHash>
Current Behavior
It does nothing and returns exit-code = 0 (success). This is quite misleading because it could make anyone think that the validation was successful on the last commit (especially in CI scenarios).
Expected Behavior
If commit-hash supplied for --from and --to is the same, it should just analyze one single commit message for the supplied commit hash. Or at least return an exit-code different than 0 to denote that the supplied params were invalid (invalid in the sense that commitlint didn't validate anything).
Affected packages
Context
I was trying to develop a simple GitHub actions CI workflow that checks the single last commit hash. The flag
--edit
didn't work in this scenario so I tried --from and --to with${{ github.sha }
but, as you can see from this bug I just filed, it didn't work.You might want to suggest that I should use the previous commit hash for the
from
flag, but I believe that in order to achieve this I probably need to tweak theactions/checkout@v2
step with afetch-depth: 0
option; which is not ideal (because it's not easy to figure out). Fixing this bug should probably be better.Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: