nix-community / label-approved

a program to label approved PRs in nixpkgs [maintainer=@Artturin]
14 stars 4 forks source link

Simplify logic for maintainer approvals #31

Closed wegank closed 1 month ago

wegank commented 1 month ago

There's no need to loop through lists of approved users and maintainers to find common users, when one can simply do a set intersection if they are constructed as sets.

By simplifying the logic as above, one also avoids adding the label 12.approved-by: package-maintainer twice when two maintainers have given their approval.

wegank commented 1 month ago

Tested on the last 1000 PRs in Nixpkgs.