Skip to content

Fix fork deletion for squashed/closed PRs#130

Open
azat-io wants to merge 3 commits into
denis-sokolov:masterfrom
azat-io:fix/squash
Open

Fix fork deletion for squashed/closed PRs#130
azat-io wants to merge 3 commits into
denis-sokolov:masterfrom
azat-io:fix/squash

Conversation

@azat-io

@azat-io azat-io commented Jan 24, 2026

Copy link
Copy Markdown

Squash/rebase merges remove the original branch commits, so compareCommits could not detect merged work and forks weren’t offered for deletion.

This change checks PR status first: merged/closed PRs mark the branch as not useful, open PRs keep the fork, and only then falls back to compareCommits.

Added tests for merged/closed/open PRs and for the no‑PR fallback case.

@waldyrious

waldyrious commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

The support for squash merges is great, but I'm not sure about PRs that are closed without being merged. Personally I would typically not want to delete a fork with modifications that were not merged upstream. At least they should be presented separately to make sure the user doesn't delete them and lose work inadvertently.

@azat-io

azat-io commented Jan 24, 2026

Copy link
Copy Markdown
Author

@waldyrious Fixed

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.

2 participants