Requesting Reviews of Maintainers

Nixpkgs has had about 1,250 PRs merged in the last month, and that is an impossible volume to keep track of. At the same time, maintainers want to know when their package is being changed by other people. Today, OfBorg makes this easier by automatically requesting a PR be reviewed by the affected maintainers.

The feature took a long time to develop because identifying who maintained the code being changed is very complicated. The algorithm works as follows:

  1. identify all the files changed
  2. identify all the attributes changed
  3. identify the file which defines each changed attribute
  4. Remove from the list of changed attributes any which aren't defined by the list of changed files
  5. ping the remaining attributes' maintainers

Unfortunately, GitHub's review request feature only supports requesting reviews of collaborators. Many of our maintainers are not collaborators, and so this won't work for everybody. Perhaps the next improvement is using comments to mention them. The good news is the very hard part (identifying the maintainers) is solved.

Note, to avoid pinging the entire universe, OfBorg will only request reviews of at most 10 people. If there are more than 10 maintainers, it will not request any of them. However, the complete list of maintainers and their owned packages is always listed in the check "grahamcofborg-eval-check-maintainers".

For a more detailed look, you can see the implementation in the pull request

OfBorg is a big help to the NixOS ecosystem, and I can't imagine how we would merge so many pull requests each month without it. Thank you to my patreons for supporting my work by paying for the server costs.

Graham