summary refs log tree commit diff
path: root/maintainers
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-02-28 15:17:42 +0100
committerProfpatsch <mail@profpatsch.de>2018-03-04 03:26:44 +0100
commitaa47bac04f06aeea993dc2e2cc6649fde4f31ed7 (patch)
tree5595740705da879d4702351b929323bd3bde0494 /maintainers
parentcf1b51aba2780fda582a18b1f97b1919339ddcd9 (diff)
downloadnixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.tar
nixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.tar.gz
nixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.tar.bz2
nixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.tar.lz
nixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.tar.xz
nixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.tar.zst
nixpkgs-aa47bac04f06aeea993dc2e2cc6649fde4f31ed7.zip
Convert maintainer file entries to attributes, add github handles
Based on https://github.com/NixOS/nixpkgs/pull/34842, the
nix-instantiate output was pretty-printed and the validity of the github handles
manually verified, by automatically checking whether the user handles exist on
github (https://github.com/userhandle, status 200 or 404).
Each handle under 5 characters was manually checked (because the collision
probability with non-maintainer accounts is high), each missing entry was
manually researched.

The script used is kept in `maintainers/scripts` as an example of how to work
with the mainainers list through nix’ JSON interface.
Diffstat (limited to 'maintainers')
-rwxr-xr-xmaintainers/scripts/check-maintainer-github-handles.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/maintainers/scripts/check-maintainer-github-handles.sh b/maintainers/scripts/check-maintainer-github-handles.sh
new file mode 100755
index 00000000000..e389fde7d8a
--- /dev/null
+++ b/maintainers/scripts/check-maintainer-github-handles.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p jq parallel
+
+# Example how to work with the `lib.maintainers` attrset.
+# Can be used to check whether all user handles are still valid.
+
+set -e
+
+# checks whether a user handle can be found on github
+function checkUser {
+    local user="$1"
+    local status=
+    status="$(curl --silent --head "https://github.com/${user}" | grep Status)"
+    printf "%s\t\t\t\t%s\n" "$status" "$user"
+}
+export -f checkUser
+
+# output the maintainers set as json
+# and filter out the github username of each maintainer (if it exists)
+# then check 100 at the same time
+nix-instantiate -A lib.maintainers --eval --strict --json \
+    | jq -r '.[]|.github' \
+    | parallel -j100 checkUser