diff --git a/.github/workflows/code_analysis.yml b/.github/workflows/code_analysis.yml index caf0f89c3f0e2..c3229ee70e32d 100644 --- a/.github/workflows/code_analysis.yml +++ b/.github/workflows/code_analysis.yml @@ -96,7 +96,7 @@ jobs: end=$((start + length)) diff_command+="ruff format --diff --range $start-$end $file && " apply_command+="ruff format --range $start-$end $file && " - done < <(git diff --unified=0 origin/$GITHUB_BASE_REF "$file" | grep '^@@' | sed -E 's/^@@ -[0-9]+(,[0-9]+)? \+([0-9]+)(,([0-9]+))? @@.*/\2-\4/') + done < <(git diff --unified=0 HEAD~1 -- "$file" | grep '^@@' | sed -E 's/^@@ -[0-9]+(,[0-9]+)? \+([0-9]+)(,([0-9]+))? @@.*/\2-\4/') done if [ -n "$diff_command" ]; then