nixpkgs-update icon indicating copy to clipboard operation
nixpkgs-update copied to clipboard

Make existing update query match more accurately

Open roberth opened this issue 4 months ago • 1 comments

In https://github.com/NixOS/nixpkgs/pull/427151#issuecomment-3208833819, an update was cancelled because some sort of fuzzy matching happened:

Package (not) receiving update: ivpn-ui Log:

There might already be an open PR for this update:
- ivpn: 3.14.29 -> 3.14.34
  URL "https://api.github.com/repos/NixOS/nixpkgs/issues/427151"
- ivpn-service: 3.14.29 -> 3.14.34
  URL "https://api.github.com/repos/NixOS/nixpkgs/issues/427152"

I suspect what happens is that it runs a github search query, and terminates if anything appears in the results. If that's a correct assessment, perhaps another layer of filtering should happen?

  1. If the number of results reaches the API paging limit, assume the update exists (I don't think we want to keep fetching results)
  2. If the result contains an exact match in the PR title, the update already exists with near certainty
  3. If no exact match exists, open the new PR

roberth avatar Aug 21 '25 08:08 roberth

Related but slightly different false positive: when the software name is a common english word, such as "reaction". This word is in the template of pull requests, and thus the query matches on all PRs. Adding in:title to the query would prevent that type of false positives.

Example: https://github.com/NixOS/nixpkgs/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen+in%3Atitle+reaction https://github.com/NixOS/nixpkgs/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen+reaction

Related to https://github.com/NixOS/nixpkgs/pull/449292

ppom0 avatar Oct 08 '25 12:10 ppom0