Skip to content

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

Merged
javoire merged 1 commit intomainfrom
detect-merged-parent-branches
Mar 5, 2026
Merged

feat(sync): detect merged parent branches via git history#74
javoire merged 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 force-pushed the detect-merged-parent-branches branch from 62232cf to 96e1291 Compare March 5, 2026 17:16
@javoire javoire merged commit 61a1287 into main Mar 5, 2026
@javoire javoire deleted the detect-merged-parent-branches branch March 5, 2026 17:17
javoire pushed a commit that referenced this pull request Mar 5, 2026
…026-03-05)

### Features

* **sync:** detect merged parent branches via git history ([#74](#74)) ([61a1287](61a1287))
@javoire
Copy link
Owner Author

javoire commented Mar 5, 2026

🎉 This PR is included in version 1.21.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant