From 2543fcf88948cff27beaf9f818991fdd4b585e7a Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Mon, 23 Jun 2025 21:48:09 +0200 Subject: [PATCH] limit PR diff size and filter control characters - Limit the diff to the first 10.000 lines - Filter out problematic control characters --- .github/workflows/ai_pr_title_review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ai_pr_title_review.yml b/.github/workflows/ai_pr_title_review.yml index 8b9550ace..cafa05b3e 100644 --- a/.github/workflows/ai_pr_title_review.yml +++ b/.github/workflows/ai_pr_title_review.yml @@ -66,7 +66,7 @@ jobs: id: get_diff run: | git fetch origin ${{ github.base_ref }} - git diff origin/${{ github.base_ref }}...HEAD > pr.diff + git diff origin/${{ github.base_ref }}...HEAD | head -n 10000 | grep -vP '[\x00-\x08\x0B\x0C\x0E-\x1F\x7F\x{202E}\x{200B}]' > pr.diff echo "diff<> $GITHUB_OUTPUT cat pr.diff >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT