From 06fd0d3a73a4f4beaeb522743f1b9978a37fd7f5 Mon Sep 17 00:00:00 2001 From: onlyjackfrost Date: Mon, 4 Nov 2024 11:48:23 +0800 Subject: [PATCH] auto fix lint issue --- .github/workflows/ui-lint.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui-lint.yaml b/.github/workflows/ui-lint.yaml index 7d335b86e..e6803a8a5 100644 --- a/.github/workflows/ui-lint.yaml +++ b/.github/workflows/ui-lint.yaml @@ -6,6 +6,8 @@ name: Wren-UI Lint on: pull_request: types: [ labeled, synchronize ] + paths: + - 'wren-ui/src/**' permissions: contents: read @@ -47,6 +49,19 @@ jobs: run: yarn list - name: Install Node.js dependencies run: yarn install - - name: Run lint - run: yarn lint + - name: Run lint and fix + run: yarn next lint --fix + - name: Commit lint fixes + if: always() + run: | + git config --global user.name "wren-ai[bot]" + git config --global user.email "dev@cannerdata.com" + git add . + git diff --staged --quiet || git commit -m "chore: auto-fix lint issues" + - name: Push changes + if: always() + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.head_ref }} \ No newline at end of file