From c22d7a4a7a83e67f438a42979569359d8b6b517d Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 19 Jun 2024 09:47:31 -0300 Subject: [PATCH] chore: Update lint-js workflow to run Prettier and commit changes Apply Prettier formatting to the codebase by running the Prettier command in the src/frontend directory. Also, add a step to commit the changes automatically using the git-auto-commit-action. This update improves code formatting and ensures consistency in the repository. --- .github/workflows/lint-js.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 300903288..d381a467f 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -10,8 +10,10 @@ env: jobs: run-linters: - name: Run linters + name: Run Prettier runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code @@ -38,16 +40,13 @@ jobs: npm install if: ${{ steps.setup-node.outputs.cache-hit != 'true' }} - - name: Run linters - uses: wearerequired/lint-action@v2 + - name: Run Prettier + run: | + cd src/frontend + npm run format + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 with: - github_token: ${{ secrets.github_token }} - auto_fix: true - git_email: "gabriel@langflow.org" - # Enable linters - # eslint: true - # eslint_auto_fix: true - prettier: true - prettier_auto_fix: true - prettier_args: '--write \"{tests,src}/**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore' + commit_message: Apply Prettier formatting + branch: ${{ github.head_ref }}