Make existing update query match more accurately
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?
- If the number of results reaches the API paging limit, assume the update exists (I don't think we want to keep fetching results)
- If the result contains an exact match in the PR title, the update already exists with near certainty
- If no exact match exists, open the new PR
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