`ratchetFrom 'origin/main'` can be broken in PR if the PR repo has `main` somewhere different than upstream
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 559
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 34
Description
https://github.com/diffplug/goomph/pull/191 is an interesting PR. spotless is failing, but it passes if you checkout the branch locally and clone.
The reason for the discrepancy is that `diffplug/goomph` had main at https://github.com/diffplug/goomph/commit/22f4e8d6c22366c4d9b041bec93cc42e1862d9e9, whereas `jmini/goomph` had main at https://github.com/jmini/goomph/commit/4c8da613a16f98155ee167239ced96a335ec1016. Because the PR came from `jmini`, from the PR point of view `origin/main` is `jmini/main`, whereas for most people who checkout the project, `origin/main` is `diffplug/main`.
The workaround is for the PR author to move their `main` to match the upstream project.
Ideally users wouldn't have to deal with this, maybe something like `ratchetFrom 'https://github.com/diffplug/spotless@main'`, and then Spotless can detect the correct remote or add it if missing.
Contributor guide
Assessment
This issue has not been assessed yet.