fix: change grabbing commit count
This commit is contained in:
@@ -22,12 +22,12 @@ jobs:
|
||||
- name: Fetch Commit Velocity
|
||||
run: |
|
||||
SINCE_DATE="2026-01-01T00:00:00Z"
|
||||
URL="http://gitea-http:3000/api/v1/repos/${{ github.repository }}/commits?since=${SINCE_DATE}&limit=1"
|
||||
URL="http://gitea-http:3000/api/v1/repos/${{ github.repository }}/commits?since=${SINCE_DATE}&limit=5000"
|
||||
|
||||
COMMIT_COUNT=$(wget -qSO- --header="Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$URL" 2>&1 | \
|
||||
grep "X-Total-Count" | awk '{print $2}' | tr -d '\r')
|
||||
RAW_COUNT=$(wget -qO- --header="Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$URL" | grep -c "\"sha\":" || echo 0)
|
||||
|
||||
echo "COMMIT_VELOCITY=${COMMIT_COUNT:-0}" >> $GITHUB_ENV
|
||||
echo "Final count: $RAW_COUNT"
|
||||
echo "COMMIT_VELOCITY=$RAW_COUNT" >> $GITHUB_ENV
|
||||
|
||||
- name: Update README
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user