From a1b13151ec721d5f65671b24e007189bef11daa1 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Tue, 13 Aug 2019 15:03:42 +0200 Subject: [PATCH] maintainers: compare maintainer usernames in lowercase At least a few maintainers in /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. --- ofborg/src/maintainers.nix | 2 +- ofborg/src/maintainers.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ofborg/src/maintainers.nix b/ofborg/src/maintainers.nix index 9f8f975..c519725 100644 --- a/ofborg/src/maintainers.nix +++ b/ofborg/src/maintainers.nix @@ -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; }) diff --git a/ofborg/src/maintainers.rs b/ofborg/src/maintainers.rs index 0d257d9..fe82b02 100644 --- a/ofborg/src/maintainers.rs +++ b/ofborg/src/maintainers.rs @@ -12,7 +12,7 @@ pub struct MaintainersByPackage(pub HashMap>); 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)]