File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,19 @@ jobs:
5858 echo '{ "deletions": [], "additions": [] }' > "$FILE_CHANGES_JSON_FILE"
5959
6060 # Add deletions
61- for file in $DELETED_FILES ; do
61+ git diff --diff-filter=D --name-only HEAD -- "$TARGET_DIR" | while read -r file ; do
6262 jq --arg path "$file" '.deletions += [{"path": $path}]' "$FILE_CHANGES_JSON_FILE" > "$FILE_CHANGES_JSON_FILE.tmp"
6363 mv "$FILE_CHANGES_JSON_FILE.tmp" "$FILE_CHANGES_JSON_FILE"
6464 done
6565
6666 # Add additions (new or modified files)
67- for file in $MODIFIED_FILES ; do
68- BASE64_CONTENT=$(base64 -w 0 <"$file") # Encode file content
67+ git diff --diff-filter=ACM --name-only HEAD -- "$TARGET_DIR" | while read -r file ; do
68+ BASE64_CONTENT=$(base64 -w 0 <"$file")
6969 jq --arg path "$file" --arg content "$BASE64_CONTENT" \
7070 '.additions += [{"path": $path, "contents": $content}]' "$FILE_CHANGES_JSON_FILE" > "$FILE_CHANGES_JSON_FILE.tmp"
7171 mv "$FILE_CHANGES_JSON_FILE.tmp" "$FILE_CHANGES_JSON_FILE"
7272 done
73-
73+
7474 # Create a temporary file for the final JSON payload
7575 JSON_PAYLOAD_FILE=$(mktemp)
7676
You can’t perform that action at this time.
0 commit comments