Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Merging a downstream PR (without parents) causes av to think the entire stack is merged (and corrupts its state) #640

@nevir

Description

@nevir

Easy example, consider a stack with three PRs in it (main <- PR 1 <- PR 2 <- PR 3)

Say you take the changes from PR 3 and flatten them into PR 2 (or whatever upstream PR):

  • GitHub will mark the PR as merged (because it transitioned to no diff)
  • running av sync erroneously thinks all PRs in the stack are now merged (puts mergeCommit into their state, though pullRequest.state is still OPEN), and tries to clean them up and truncates the rest of the stack

Workaround: ctrl-c ASAP to stop it from cleaning your branches/PRs up, and then:

  • remove the mergeCommit state from .git/av/av.db for all the branches that shouldn't be flagged merged.
  • remove the merged PR completely from state; or this will reoccur

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions