update(actions): use heatmap.json for authoritative commit history
This commit is contained in:
@@ -26,10 +26,9 @@ jobs:
|
||||
elif command -v apt-get &> /dev/null; then apt-get update && apt-get install -y jq; fi
|
||||
fi
|
||||
|
||||
USER_URL="http://gitea-http:3000/api/v1/users/patrick/heatmap?limit=1000"
|
||||
|
||||
RAW_DATA=$(wget -qO- --header="Authorization: token ${{ secrets.PAT_TOKEN }}" "$USER_URL")
|
||||
TOTAL_COMMITS=$(echo "$RAW_DATA" | jq '. | map(.contributions) | add')
|
||||
# Use our own heatmap.json instead of Gitea API
|
||||
HEATMAP_FILE="public/heatmap.json"
|
||||
TOTAL_COMMITS=$(jq '[.[] | .count] | add' "$HEATMAP_FILE")
|
||||
|
||||
echo "Global Commit Velocity: $TOTAL_COMMITS"
|
||||
echo "COMMIT_VELOCITY=$TOTAL_COMMITS" >> $GITHUB_ENV
|
||||
|
||||
Reference in New Issue
Block a user