diffplug / diffplug/spotless

`ratchetFrom 'origin/main'` can be broken in PR if the PR repo has `main` somewhere different than upstream

Aperta
#1,238 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Java
Stelle
5.7k
Fork
561
Merge medio
1g 14h
PR unite (30g)
43

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start with the ratchetFrom 'origin/main' configuration and reproduce the difference between a local checkout and a pull-request repository, using the linked PR as the example. Done should allow a repository-independent reference such as 'https://github.com/diffplug/spotless@main', with the correct remote detected or added when needed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, java
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.