Skip to content

Rebase stack leaves upper PRs' test-merge refs on orphaned/chained base commits, breaking merge-ref CI #548

Description

@mcmathews

Follow-up to #258 with a fresh reproduction, filed as a bug.

Repro: 5-PR stack (bottom based on main, each PR based on the branch below). Rebased the stack with gh-stack. Afterwards every PR's REST base.sha matched its base branch tip, but refs/pull/N/merge did not:

  • Bottom+1 PR: base-side parent is the pre-rebase tip of its base branch (no longer reachable from any ref).
  • Each PR above that: base-side parent is the refs/pull/N/merge commit of the PR below it, not its base branch tip.
  • Bottom PR (based on main): unaffected.

CI that builds from the merge ref (Jenkins GitHub Branch Source, "merge with target") fetches only branch refs, so every affected PR fails checkout with merge: <sha> - not something we can merge. Per #258, rescans and close/reopen don't recover it; retargeting the base does.

Expected: after a restack, each PR's test-merge ref is recomputed against the current tip of its base branch.

Happy to share SHAs and logs privately.

Activity

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

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