2021-09-10 00:55:12 +02:00
|
|
|
# Nix script to lookup maintainer github handles from their email address. Used by ./hydra-report.hs.
|
2023-01-30 00:27:03 +01:00
|
|
|
#
|
|
|
|
# This script produces an attr set mapping of email addresses to GitHub handles:
|
|
|
|
#
|
|
|
|
# ```nix
|
|
|
|
# > import ./maintainer-handles.nix
|
|
|
|
# { "cdep.illabout@gmail.com" = "cdepillabout"; "john@smith.com" = "johnsmith"; ... }
|
|
|
|
# ```
|
|
|
|
#
|
|
|
|
# This mapping contains all maintainers in ../../mainatainer-list.nix, but it
|
|
|
|
# ignores maintainers who don't have a GitHub account or an email address.
|
2021-09-10 00:55:12 +02:00
|
|
|
let
|
|
|
|
pkgs = import ../../.. {};
|
|
|
|
maintainers = import ../../maintainer-list.nix;
|
|
|
|
inherit (pkgs) lib;
|
2023-01-30 00:27:03 +01:00
|
|
|
mkMailGithubPair = _: maintainer:
|
|
|
|
if (maintainer ? email) && (maintainer ? github) then
|
|
|
|
{ "${maintainer.email}" = maintainer.github; }
|
|
|
|
else
|
|
|
|
{};
|
2021-09-10 00:55:12 +02:00
|
|
|
in lib.zipAttrsWith (_: builtins.head) (lib.mapAttrsToList mkMailGithubPair maintainers)
|