Skip to content

Stacked branches do not retarget when additional branches are introduced after PR creation #13862

@robin-fritz-EL

Description

@robin-fritz-EL

Version

0.19.10

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

On friday, I created two draft PRs from two stacked branches.
State:
PR 2 - branch-2 -> targetting branch-1
PR 1 - branch-1 -> targetting main

Today, I created another branch that was below those two and added some commits in there and created another draft PR + force pushed the other two.

State now, 3 stacked branches:
PR 2 - branch-2 -> targetting branch-1
PR 1 - branch-1 -> targetting main
PR 3 - branch-3 -> targetting main

The problem is in the last line where I would have expected GitButler to retarget PR1 to branch-3.

How to reproduce (Optional)

  • create two stacked branches and PRs for them.
  • create another branch below the stack and create a PR for it.
  • force push the other stacked branches
  • check the PRs on GitHub
    • PR 1 -> main
    • PR 2 -> branch-1
    • PR 3 -> main

Expected behavior (Optional)

  • create two stacked branches and PRs for them.
  • create another branch below the stack and create a PR for it.
  • force push the other stacked branches
  • check the PRs on GitHub
    • PR 1 -> branch-3
    • PR 2 -> branch-1
    • PR 3 -> main

Relevant log output (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions