This commit is contained in:
thinkasany 2025-06-04 11:21:21 +08:00 committed by GitHub
commit c6e8fb07ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,15 @@ jobs:
pull-requests: write # for actions-cool/verify-files-modify to update status of PRs
runs-on: ubuntu-latest
steps:
- name: get commit count
id: get_commit_count
run: |
PR_AUTHOR="${{ github.event.pull_request.user.login }}"
RESULT_DATA=$(curl -s "https://api.github.com/repos/${{ github.repository }}/commits?author=${PR_AUTHOR}&per_page=5")
DATA_LENGTH=$(echo "$RESULT_DATA" | jq 'if type == "array" then length else 0 end')
echo "COUNT=$DATA_LENGTH" >> $GITHUB_OUTPUT
- name: verify-version
if: ${{ steps.get_commit_count.outputs.COUNT < 5 }}
uses: actions-cool/verify-files-modify@v1
with:
forbid-paths: '.github/, scripts/'