← undupe

About undupe

undupe finds pull requests on busy GitHub repos that do the same work, so maintainers can close the extras and contributors can check before they start.

Why it exists

On popular open-source projects, people often fix the same bug or build the same feature without knowing someone else already has. If five people open a PR for one fix, four of them wasted their time, and a maintainer still has to read all five.

It usually isn’t carelessness. The second PR tends to arrive within days of the first: there’s just nowhere to see that the work is already in progress. undupe is that place.

How it works

  1. Read every pull request, once a day.For each tracked repo, undupe downloads all open pull requests and recently closed ones from GitHub: their titles, descriptions, linked issues and the list of files each one changes.
  2. Compare every pair of open PRs.Two PRs are matched if any of these is true:
    • they say they fix the same issue (“Fixes #123”), and their titles or files also look alike;
    • their titles use mostly the same words (rare words like “Perl” count for more than common ones like “fix”);
    • they change mostly the same files (files almost every PR touches, like README, count for very little); or
    • they both touch a file almost no other PR does, and share an unusual word in their titles, like two separate PRs both adding perl.py.
  3. Group the matches.PRs that match are put in one group, oldest first. Strong matches are shown as “likely”, weaker ones as “possible”.
  4. Look for work that’s already done.Each open PR is also compared with closed PRs the same way. Many maintainers ship a PR’s code in another commit and then close it, so a closed PR doesn’t mean the work was rejected; an open PR matching it may simply no longer be needed.
  5. Check the matches by hand.Someone reads the PRs in each group and marks it as a real duplicate or not. Confirmed groups get a ✓ Checked badge (hover it to see who checked and how). Rejected matches disappear from the site.
  6. Let anyone correct it.Every group has “Not a duplicate?” and “Confirm” links that open a pre-filled issue, so mistakes get fixed.

What the numbers mean

Could be closed
A range. The low end is the extra PRs in duplicate groups (keep one per group, close the rest). The high end adds open PRs whose work already appears in a closed PR; those need a quick check that the fix really landed, because many maintainers ship code without GitHub’s merge button.
PRs to review
One per duplicate group whose work hasn’t landed yet: the PR worth a maintainer’s time. It’s not a claim that the PR is ready to merge.
Groups of likely duplicates
Sets of open PRs that appear to do the same work.
Extra PRs
In each group, every PR after the first. If three PRs do one job, two are extra.
Issues with 2+ open PRs
Issues that more than one open PR says it fixes.
Open PRs that redo closed work
Open PRs that look like a PR that has already been closed or merged.

What it can’t do

The project

undupe is open source: github.com/SrijanSriv/undupe. Everything that produces these pages is there, including the matching rules and every checked verdict (verdicts.json).

Want another repository tracked, or spotted a mistake? Open an issue.