Merge branch 'develop' into fix.quote-not-working-on-old-messages #6100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Format Code with Oxfmt | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| format: | |
| if: ${{ github.repository != 'RocketChat/Rocket.Chat.ReactNative' || (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/single-server') }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout and Setup Node | |
| uses: ./.github/actions/setup-node | |
| - name: Run Oxfmt | |
| run: pnpm exec oxfmt | |
| - name: Run Oxlint | |
| run: pnpm exec oxlint --fix -A react/exhaustive-deps | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "No code format changes detected" | |
| echo "changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Code format changes detected" | |
| echo "changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push format changes | |
| if: steps.changes.outputs.changes == 'true' | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| git add . | |
| git commit -m "chore: format code and fix lint issues" | |
| git push origin ${{ github.ref_name }} |