diff --git a/.github/workflows/security-guard.lock.yml b/.github/workflows/security-guard.lock.yml index 1db6ed79..10908cdc 100644 --- a/.github/workflows/security-guard.lock.yml +++ b/.github/workflows/security-guard.lock.yml @@ -313,7 +313,7 @@ jobs: id: pr-diff if: github.event.pull_request.number name: Fetch PR changed files - run: "DELIM=\"GHAW_PR_FILES_$(date +%s)\"\n{\n echo \"PR_FILES<<${DELIM}\"\n gh api \"repos/${GH_REPO}/pulls/${PR_NUMBER}/files\" \\\n --paginate --jq '.[] | \"### \" + .filename + \" (+\" + (.additions|tostring) + \"/-\" + (.deletions|tostring) + \")\\n\" + (.patch // \"\") + \"\\n\"' \\\n | head -c 8000\n echo \"${DELIM}\"\n} >> \"$GITHUB_OUTPUT\"\n" + run: "DELIM=\"GHAW_PR_FILES_$(date +%s)\"\n{\n echo \"PR_FILES<<${DELIM}\"\n gh api \"repos/${GH_REPO}/pulls/${PR_NUMBER}/files\" \\\n --paginate --jq '.[] | \"### \" + .filename + \" (+\" + (.additions|tostring) + \"/-\" + (.deletions|tostring) + \")\\n\" + (.patch // \"\") + \"\\n\"' \\\n | head -c 8000 || true\n echo \"${DELIM}\"\n} >> \"$GITHUB_OUTPUT\"\n" - name: Configure Git credentials env: diff --git a/.github/workflows/security-guard.md b/.github/workflows/security-guard.md index 240f2ec6..389bbf1f 100644 --- a/.github/workflows/security-guard.md +++ b/.github/workflows/security-guard.md @@ -32,7 +32,7 @@ steps: echo "PR_FILES<<${DELIM}" gh api "repos/${GH_REPO}/pulls/${PR_NUMBER}/files" \ --paginate --jq '.[] | "### " + .filename + " (+" + (.additions|tostring) + "/-" + (.deletions|tostring) + ")\n" + (.patch // "") + "\n"' \ - | head -c 8000 + | head -c 8000 || true echo "${DELIM}" } >> "$GITHUB_OUTPUT" env: