Remove risks of rate limitation on large PRs (#56)

This commit is contained in:
boubou19 2026-01-19 20:21:18 +01:00 committed by GitHub
parent a7dcf25ecb
commit be9f21cb0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,8 @@ jobs:
echo 'png_files<<EOF' echo 'png_files<<EOF'
if [ "${{ github.event_name }}" = pull_request ] && if [ "${{ github.event_name }}" = pull_request ] &&
[ "${{ !github.event.pull_request.draft }}" = true ]; then [ "${{ !github.event.pull_request.draft }}" = true ]; then
gh pr diff "$PR_NUMBER" --name-only | grep '*.png' git fetch origin "$GITHUB_BASE_REF" "refs/pull/$PR_NUMBER/head:pr-$PR_NUMBER" &&
git diff --name-only -l10000 "origin/$GITHUB_BASE_REF" "pr-$PR_NUMBER" -- '*.png'
else else
find "$GITHUB_WORKSPACE" -type f -name "*.png" ! -path "$GITHUB_WORKSPACE/.git/*" -print 2>/dev/null find "$GITHUB_WORKSPACE" -type f -name "*.png" ! -path "$GITHUB_WORKSPACE/.git/*" -print 2>/dev/null
fi fi