Best way to revive an old PR that needs major rework?

Hi everyone,

I wanted to ask about the preferred way to move forward with a contribution that has been sitting unattended for a couple of months due to an initial wrong approach.

I have an open PR where I received some early review and direction, but after revisiting it now, I realize that the current implementation has drifted quite a bit from what would be considered the right approach. Cleaning it up would effectively mean reworking most of the changes.

In such situations, is it generally recommended to:

  • Close the existing PR and open a fresh one with the corrected approach, or

  • Keep the same PR and push a reset (or large rework) commit that aligns the implementation with the intended direction?

I would prefer not to lose the context and initial review that happened on the original PR, but at the same time the current state of the PR is quite messy.

Would appreciate guidance on what is considered best practice in these cases.

Thanks!

1 Like

personally i think either approach is fine, and is largely up to what you prefer. you may want to ask your reviewers if they have a preference if there are like a lot of comments that would be annoying to cross reference were you to close and open a new PR.

1 Like

so, i am working on a new command and initially i decided the working and UI of the command on my own. later, during code review by the team the UI started to become concrete. therefore, most of the comments are to make the code follow general practices to write a command. But now i have a clear idea of how the codes are written, and how the UI should be.
that’s why i was thinking to start again, but i think i will just make a commit with correct files and expected code. and keep working on it :)