Open
Description
Description
Runcz check --range origin/master..HEAD
to check commits in CI occasionally fails.
And it worked after I retried the job.But sometimes it didn't work after retrying multiple times.
I couldn't find out the reason ,
Steps to reproduce
lint:
retry: 1
script:
- cz version
- cz check --rev-range origin/master..HEAD
Current behavior
cz check --rev-range origin/master..HEAD
failed. Outputs attached below:
fatal: ambiguous argument 'master..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Desired behavior
cz check --rev-range
can run successfully in gitlab CI.
Screenshots
Environment
commitizen version: 2.34.0
python version: 3.7.5
operating system: Linux
Activity
Lee-W commentedon Sep 22, 2022
Is it possible that the git repo doesn't setup remote 🤔
SsuperL commentedon Sep 23, 2022
I run command
git remote -v
in the CI , and it shows that the remote has been setup.SsuperL commentedon Sep 23, 2022
Lee-W commentedon Sep 23, 2022
Hmmm... As I'm not able to reproduce it, I don't have any clue on how we could fix it. But we can keep it open till you or someone encounter this issue again with more detail
SsuperL commentedon Sep 25, 2022
Actually,this issue has come up again.
SsuperL commentedon Sep 26, 2022
And when I merged the branch into master,it said that there is no commit found range
origin/master..HEAD
.Lee-W commentedon Sep 26, 2022
Do you mean after merging back to the master branch? If that's the case, your
HEAD
will on onmaster
so the result seem to be expected.SsuperL commentedon Sep 27, 2022
yes. Or can it skip check when there's no commit rather than make the job failed?
Lee-W commentedon Oct 3, 2022
@SsuperL Please try
cz --no-raise 3 check --rev-range master..
. it's output the message with a zero return codehttps://commitizen-tools.github.io/commitizen/bump/#easy-way
SsuperL commentedon Oct 9, 2022
I'll try it.Thank you!
Lujeni commentedon Oct 19, 2022
@SsuperL did you try to
git fetch
before your command ? its seems GitLab CI dont fetch every branchSsuperL commentedon Oct 24, 2022
SsuperL commentedon Nov 29, 2022
Lee-W commentedon Nov 29, 2022
do you have remote
origin
and branchmaster
?17 remaining items