16
1
Fork 0

Added connected and unconnected account count in activity report script.

master
Christian P. MOMON 1 year ago committed by Pierre-Louis Bonicoli
parent 513e8085dc
commit 7aeee0a4ae
Signed by: pilou
GPG Key ID: 06914C4A5EDAA6DD
  1. 6
      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

Loading…
Cancel
Save