fix: change to fixed user, with Giteas format
This commit is contained in:
@@ -22,16 +22,13 @@ 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=1000"
|
||||
URL="http://gitea-http:3000/api/v1/repos/${{ github.repository }}/commits?since=${SINCE_DATE}&limit=2000"
|
||||
|
||||
wget -qO response.json --header="Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$URL"
|
||||
TOTAL_NAMES=$(wget -qO- --header="Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$URL" | grep -o "\"name\":\"patrick\"" | wc -l)
|
||||
|
||||
echo "API Response Preview:"
|
||||
head -n 10 response.json
|
||||
RAW_COUNT=$((TOTAL_NAMES / 2))
|
||||
|
||||
RAW_COUNT=$(grep -c "\"url\":" response.json || echo 0)
|
||||
|
||||
echo "Final count detected: $RAW_COUNT"
|
||||
echo "Detected $RAW_COUNT manual commits for user: patrick"
|
||||
echo "COMMIT_VELOCITY=$RAW_COUNT" >> $GITHUB_ENV
|
||||
|
||||
- name: Update README
|
||||
|
||||
Reference in New Issue
Block a user