Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(wren-ui): add auto-fix lint in workflow #859

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/ui-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Wren-UI Lint
on:
pull_request:
types: [ labeled, synchronize ]
paths:
- 'wren-ui/src/**'

permissions:
contents: read
Expand Down Expand Up @@ -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 "[email protected]"
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 }}