summaryrefslogtreecommitdiffstats
path: root/maintainers
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-12-18 00:07:57 +0000
committerGitHub <noreply@github.com>2021-12-18 00:07:57 +0000
commiteec551fc15098a4928dffaa8e9e28db2c9ea596c (patch)
treee22063bcafda5e717335c7e0123954df29d6a544 /maintainers
parent2189a53dad0e48ea7211c32cc1832a82001d976b (diff)
parent7cb82ec6149236f3655bd0fb269c41b55e4892fc (diff)
Merge master into haskell-updates
Diffstat (limited to 'maintainers')
-rwxr-xr-xmaintainers/scripts/check-maintainer-github-handles.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/maintainers/scripts/check-maintainer-github-handles.sh b/maintainers/scripts/check-maintainer-github-handles.sh
index 879a2e452cb3..a5555ca9e909 100755
--- a/maintainers/scripts/check-maintainer-github-handles.sh
+++ b/maintainers/scripts/check-maintainer-github-handles.sh
@@ -4,20 +4,19 @@
# Example how to work with the `lib.maintainers` attrset.
# Can be used to check whether all user handles are still valid.
-set -e
-
-# nixpkgs='<nixpkgs>'
-# if [ -n "$1" ]; then
+set -o errexit -o noclobber -o nounset -o pipefail
+shopt -s failglob inherit_errexit
function checkCommits {
- local user="$1"
- local tmp=$(mktemp)
+ local ret status tmp user
+ user="$1"
+ tmp=$(mktemp)
curl --silent -w "%{http_code}" \
"https://github.com/NixOS/nixpkgs/commits?author=$user" \
> "$tmp"
# the last line of tmp contains the http status
- local status=$(tail -n1 "$tmp")
- local ret=
+ status=$(tail -n1 "$tmp")
+ ret=
case $status in
200) if <"$tmp" grep -i "no commits found" > /dev/null; then
ret=1
@@ -31,7 +30,7 @@ function checkCommits {
checkCommits "$user"
ret=$?
;;
- *) printf "BAD STATUS: $(tail -n1 $tmp) for %s\n" "$user"; ret=1
+ *) printf "BAD STATUS: $(tail -n1 "$tmp") for %s\n" "$user"; ret=1
ret=1
;;
esac
@@ -63,4 +62,5 @@ nix-instantiate -A lib.maintainers --eval --strict --json \
| jq -r '.[]|.github|select(.)' \
| parallel -j5 checkUser
+# To check some arbitrary users:
# parallel -j100 checkUser ::: "eelco" "profpatsch" "Profpatsch" "a"