Skip to content

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

Open

Description

@nedtwigg

diffplug/goomph#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 diffplug/goomph@22f4e8d, whereas jmini/goomph had main at jmini/goomph@4c8da61. 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 '/diffplug/spotless@main', and then Spotless can detect the correct remote or add it if missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions