Skip to content

feat(sync): detect merged parent branches via git history#73

Closed
javoire wants to merge 1 commit intomainfrom
detect-merged-parent-branches
Closed

feat(sync): detect merged parent branches via git history#73
javoire wants to merge 1 commit intomainfrom
detect-merged-parent-branches

Conversation

@javoire
Copy link
Owner

@javoire javoire commented Mar 5, 2026

Summary

  • Adds IsAncestor git client method wrapping git merge-base --is-ancestor
  • In stack sync, when no PR is found for a branch, falls back to git history to detect if it was merged into the base branch — handles both "own branch merged" (remove from stack) and "parent merged" (reparent children)
  • In stack status, shows a hint when a branch appears merged via git history

This fixes the case where a parent branch was merged (e.g. via a PR in a different repo or when PR lookup fails) but stackinator couldn't detect it because it only relied on GitHub PR status.

🤖 Generated with Claude Code

When no PR is found for a branch, fall back to `git merge-base
--is-ancestor` to check if it was merged into the base branch.
This handles cases where PRs are missing or from external repos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@javoire javoire marked this pull request as ready for review March 5, 2026 16:47
@javoire javoire enabled auto-merge (squash) March 5, 2026 16:59
@javoire javoire disabled auto-merge March 5, 2026 17:12
@javoire javoire closed this Mar 5, 2026
@javoire javoire reopened this Mar 5, 2026
@javoire javoire closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant