maintainers: compare maintainer usernames in lowercase

At least a few maintainers in <nixpkgs>/maintainers/maintainer-list.nix
specified a lowercase username for GitHub while actually having a
username with upper case characters.
Ofborg performs case-sensitive comparisons on PR submitters and the
above mentioned usernames. This causes borg to not recognize users when
there is different casing between the above list and the 'user.name'
value of github's api response, even though the casing is irrelevant for
distinguishing different users.
This commit is contained in:
WilliButz 2019-08-13 15:03:42 +02:00
parent dbfa0805f3
commit a1b13151ec
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ let
(builtins.map
(pkg:
builtins.map (maintainer: {
handle = maintainer.github;
handle = pkgs.lib.toLower maintainer.github;
packageName = pkg.name;
dueToFiles = pkg.filenames;
})

View file

@ -12,7 +12,7 @@ pub struct MaintainersByPackage(pub HashMap<Package, HashSet<Maintainer>>);
pub struct Maintainer(String);
impl<'a> From<&'a str> for Maintainer {
fn from(name: &'a str) -> Maintainer {
Maintainer(name.to_owned())
Maintainer(name.to_ascii_lowercase().to_owned())
}
}
#[derive(Deserialize, Clone, Debug, Eq, PartialEq, Hash)]