Skip to content

fix(sync): detect branches merged by force-push to trunk - #1385

Open
AruneshDwivedi wants to merge 1 commit into
abhinav:mainfrom
AruneshDwivedi:fix/sync-self-merged
Open

fix(sync): detect branches merged by force-push to trunk#1385
AruneshDwivedi wants to merge 1 commit into
abhinav:mainfrom
AruneshDwivedi:fix/sync-self-merged

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

When a stack is merged by force-pushing the tip directly to trunk instead of through a change request, the forge API has no record of the merge. This leaves tracked branches marked as live even though their commits are now reachable from trunk.

The fix adds a local-ancestor check after findForgeFinishedBranches returns. Branches whose head is reachable from the updated trunk hash are now also included in the deletion candidates, matching the behavior of the unsupported-forge code path.

Closes #1248.

When a stack is merged by force-pushing the tip directly to trunk instead of through a change request, the forge API has no record of the merge. This leaves tracked branches marked as live even though their commits are now reachable from trunk.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
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.

repo sync: detect self-merged stacks pushed directly to trunk

1 participant