ci: skip verify-files-modify for long-time contributors

This commit is contained in:
thinkasany 2025-06-03 21:34:15 +08:00
parent 50b915420c
commit fcf10bc238

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/'