feat: adding chat isolation #244
This file contains 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: autofix.ci | |
on: | |
pull_request: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
autofix: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Format code with Prettier | |
id: format | |
run: | | |
pnpm exec prettier --write "**/*.{js,jsx,ts,tsx,json,md}" | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "FORMAT_HAS_CHANGES=true" >> $GITHUB_ENV | |
fi | |
git add . | |
- name: Run ESLint fix | |
id: lint | |
continue-on-error: true | |
run: | | |
pnpm exec eslint . --ext .js,.jsx,.ts,.tsx --fix | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "LINT_HAS_CHANGES=true" >> $GITHUB_ENV | |
fi | |
# Run ESLint again to check remaining issues | |
pnpm exec eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 || echo "LINT_HAS_ERRORS=true" >> $GITHUB_ENV | |
git add . | |
- name: Check TypeScript | |
continue-on-error: true | |
run: | | |
pnpm exec tsc --noEmit | |
if [ $? -ne 0 ]; then | |
echo "TS_HAS_ERRORS=true" >> $GITHUB_ENV | |
fi | |
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a |