From 7aeee0a4ae0c6ef98ebd24d0bb6edaf99d483ab0 Mon Sep 17 00:00:00 2001 From: Christian Pierre MOMON Date: Sat, 1 May 2021 03:48:27 +0200 Subject: [PATCH] Added connected and unconnected account count in activity report script. --- rapport_activite/rapport_activite.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rapport_activite/rapport_activite.sh b/rapport_activite/rapport_activite.sh index ea705f2..dc71f32 100755 --- a/rapport_activite/rapport_activite.sh +++ b/rapport_activite/rapport_activite.sh @@ -98,6 +98,12 @@ generateSpecificReport() local accountCount=$(curl -s "https://forge.chapril.org/api/v1/users/search?limit=100000&token=$GITEA_API_KEY" | jq '.data | length') echo "Nombre de comptes = $accountCount" + local connectedAccountCount=$(curl -s "https://forge.chapril.org/api/v1/users/search?limit=100000&token=$GITEA_API_KEY" | jq '.data[].last_login' | grep -cv "1970") + echo "Nombre de comptes connectés au moins une fois = $connectedAccountCount" + + local unconnectedAccountCount=$(curl -s "https://forge.chapril.org/api/v1/users/search?limit=100000&token=$GITEA_API_KEY" | jq '.data[].last_login' | grep -c "1970") + echo "Nombre de comptes jamais connectés = $unconnectedAccountCount" + #$(curl -s "https://forge.chapril.org/api/v1/admin/orgs?limit=100000&token=$GITEA_API_KEY" | jq '. | length' > t) local organizationCount=$(curl -s "https://forge.chapril.org/api/v1/admin/orgs?limit=100000&token=$GITEA_API_KEY" | jq '. | length') if [[ -z "$organizationCount" ]]; then