File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 2020 run : |
2121 # Get the list of changed files
2222 CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -E '\.(kt|kts|java|sql|yml|yaml|properties|md)$' | head -20)
23- echo "files<<EOF " >> $GITHUB_OUTPUT
23+ echo "files<<CHANGEDFILES " >> $GITHUB_OUTPUT
2424 echo "$CHANGED_FILES" >> $GITHUB_OUTPUT
25- echo "EOF " >> $GITHUB_OUTPUT
25+ echo "CHANGEDFILES " >> $GITHUB_OUTPUT
2626
2727 - name : Read changed files content
2828 id : file-content
@@ -32,19 +32,19 @@ jobs:
3232 while IFS= read -r file; do
3333 if [ -f "$file" ] && [ -s "$file" ]; then
3434 echo "Processing: $file"
35- CONTENT="$CONTENT\n\n--- File: $file ---\n"
36- head -c 8000 "$file" | cat >> temp_content.txt
37- CONTENT="$CONTENT$(cat temp_content.txt)"
38- rm -f temp_content.txt
35+ CONTENT="${CONTENT}
36+
37+ --- File: $file ---
38+ "
39+ FILE_CONTENT=$(head -c 8000 " $file")
40+ CONTENT="${CONTENT}${FILE_CONTENT}"
3941 fi
4042 done <<< "${{ steps.changed-files.outputs.files }}"
4143 fi
4244
43- {
44- echo "content<<EOF"
45- echo -e "$CONTENT"
46- echo "EOF"
47- } >> $GITHUB_OUTPUT
45+ echo "content<<FILECONTENT" >> $GITHUB_OUTPUT
46+ echo "$CONTENT" >> $GITHUB_OUTPUT
47+ echo "FILECONTENT" >> $GITHUB_OUTPUT
4848
4949 - name : AI Code Review
5050 id : ai-review
You can’t perform that action at this time.
0 commit comments