refactor: immutable auto-join toggle and clarity fixes in TeamChannel… #5560
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 Prettier | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| 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 | |
| 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 Prettier | |
| run: pnpm exec prettier --write . | |
| - name: Run ESLint | |
| run: pnpm exec eslint . --fix | |
| - 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 eslint 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 }} |