fix: indentation error
This commit is contained in:
@@ -9,7 +9,7 @@ jobs:
|
||||
sync-stats:
|
||||
runs-on: sh
|
||||
steps:
|
||||
- name: Manual Internal Checkout
|
||||
- name: Manual Internal Checkout
|
||||
run: |
|
||||
git clone --filter=blob:none http://gitea-http:3000/${{ github.repository }}.git .
|
||||
git checkout ${{ github.ref_name }}
|
||||
@@ -24,25 +24,25 @@ jobs:
|
||||
git fetch --unshallow || true
|
||||
|
||||
HUMAN_COUNT=$(git rev-list --count --author="patrick" --since="2026-01-01T00:00:00" ${{ github.ref_name }})
|
||||
|
||||
echo "Historical count for Patrick: $HUMAN_COUNT"
|
||||
echo "COMMIT_VELOCITY=$HUMAN_COUNT" >> $GITHUB_ENV
|
||||
|
||||
LOC=$(grep '"total_code"' public/code-stats.json | sed 's/[^0-9]*//g')
|
||||
FORMATTED_LOC=$(printf "%'d" $LOC)
|
||||
echo "FORMATTED_LOC=$FORMATTED_LOC" >> $GITHUB_ENV
|
||||
|
||||
echo "Injecting $FORMATTED_LOC LOC and $HUMAN_COUNT commits..."
|
||||
sed "s/REPLACE_ME_LOC/$FORMATTED_LOC/g" README.template | \
|
||||
sed "s/REPLACE_ME_COMMITS/$HUMAN_COUNT/g" > README.md
|
||||
|
||||
echo "FORMATTED_LOC=$FORMATTED_LOC" >> $GITHUB_ENV
|
||||
|
||||
- name: Commit and Push
|
||||
run: |
|
||||
git config user.name "Ares-Bot"
|
||||
git config user.email "ares@beane.me"
|
||||
git add README.md
|
||||
|
||||
if git diff --staged --quiet; then
|
||||
echo "No changes"
|
||||
else
|
||||
git commit -m "chore: sync code velocity to $FORMATTED_LOC LOC [skip ci]"
|
||||
git commit -m "chore: sync code velocity to ${{ env.FORMATTED_LOC }} LOC [skip ci]"
|
||||
git push http://${{ secrets.GITHUB_TOKEN }}@gitea-http:3000/${{ github.repository }}.git ${{ github.ref_name }}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user