diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 041e3edaea9f..b28ddb8535c9 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -35,12 +35,12 @@ jobs: with: version: ${{ env.PNPM_VERSION }} - - name: Install formatter - run: pnpm install -D -w oxfmt + - name: Install + run: pnpm install --ignore-scripts - - name: Get changed files + - name: Get changed files and write to temp id: get-changed-files - uses: actions/github-script@v7 + uses: actions/github-script@v9 with: script: | const changedFiles = await github.paginate( @@ -51,11 +51,13 @@ jobs: pull_number: context.payload.pull_request.number, } ); - return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' '); + const files = changedFiles.filter(file=> file.status !== "removed").map(file => file.filename); + if (files.length > 0) { + require('fs').writeFileSync('/tmp/changed-files.txt', files.join('\0')); + core.setOutput('has-files', 'true'); + } - name: Check formatting (changed files) + if: steps.get-changed-files.outputs.has-files == 'true' run: | - CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }}) - if [ -n "$CHANGED_FILES" ]; then - pnpm oxfmt $CHANGED_FILES --check --no-error-on-unmatched-pattern - fi + xargs -0 pnpm oxfmt --check --no-error-on-unmatched-pattern < /tmp/changed-files.txt diff --git a/.github/workflows/fix-formatting.yml b/.github/workflows/fix-formatting.yml index 7ce7ad702cf2..6aeb8ab3fc8c 100644 --- a/.github/workflows/fix-formatting.yml +++ b/.github/workflows/fix-formatting.yml @@ -33,12 +33,12 @@ jobs: with: version: ${{ env.PNPM_VERSION }} - - name: Install formatter - run: pnpm install -D -w oxfmt --ignore-scripts + - name: Install + run: pnpm install --ignore-scripts - - name: Get changed files + - name: Get changed files and write to temp id: get-changed-files - uses: actions/github-script@v7 + uses: actions/github-script@v9 with: script: | const changedFiles = await github.paginate( @@ -49,15 +49,16 @@ jobs: pull_number: context.payload.pull_request.number, } ); - return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' '); + const files = changedFiles.filter(file=> file.status !== "removed").map(file => file.filename); + if (files.length > 0) { + require('fs').writeFileSync('/tmp/changed-files.txt', files.join('\0')); + core.setOutput('has-files', 'true'); + } - name: Fix formatting - env: - CHANGED_FILES: ${{ steps.get-changed-files.outputs.result }} + if: steps.get-changed-files.outputs.has-files == 'true' run: | - if [ -n "$CHANGED_FILES" ]; then - echo "$CHANGED_FILES" | tr ' ' '\n' | xargs pnpm oxfmt --no-error-on-unmatched-pattern - fi + xargs -0 pnpm oxfmt --no-error-on-unmatched-pattern < /tmp/changed-files.txt - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/frontend/src/ts/components/pages/account-settings/BlockedUsersTab.tsx b/frontend/src/ts/components/pages/account-settings/BlockedUsersTab.tsx index 6e8cdd5cb639..71cf573eba1c 100644 --- a/frontend/src/ts/components/pages/account-settings/BlockedUsersTab.tsx +++ b/frontend/src/ts/components/pages/account-settings/BlockedUsersTab.tsx @@ -21,7 +21,7 @@ export function BlockedUsersTab() { return (
Blocked users cannot send you friend requests. > diff --git a/frontend/src/ts/components/pages/connections/PendingRequests.tsx b/frontend/src/ts/components/pages/connections/PendingRequests.tsx index 9b1ae72e0c34..213efe1b3586 100644 --- a/frontend/src/ts/components/pages/connections/PendingRequests.tsx +++ b/frontend/src/ts/components/pages/connections/PendingRequests.tsx @@ -84,8 +84,8 @@ function getColumns(): DataTableColumnDef[] { />