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

Spotless check fails in remote CI #1271

Closed
EricGao888 opened this issue Aug 7, 2022 · 2 comments
Closed

Spotless check fails in remote CI #1271

EricGao888 opened this issue Aug 7, 2022 · 2 comments
Labels

Comments

@EricGao888
Copy link
Contributor

Hello,

I'm using Spotless in my project. I want it to only check code different from a remote branch which is referred as upstream/dev. However, this causes remote CI to fail once I push the code to the remote repo and trigger the CI.

I set up ratchet as below:

<ratchetFrom>upstream/dev</ratchetFrom>

The error log I got from my GitHub Actions:

Execution default of goal com.diffplug.spotless:spotless-maven-plugin:2.23.0:check failed: No such reference 'upstream/dev' -> [Help 1]

In the end, I have to set ratchetFrom HEAD instead of upstream/dev, which is not recommended by the official doc:

image

May I ask whether there is a way to set ratchetFrom a remote branch without failing the remote CI?

Thanks!

@nedtwigg
Copy link
Member

nedtwigg commented Aug 9, 2022

The problem you are having is about clone depth. See #710 for a workaround.

@nedtwigg nedtwigg closed this as completed Aug 9, 2022
@EricGao888
Copy link
Contributor Author

The problem you are having is about clone depth. See #710 for a workaround.

Thanks for the reply : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants