From fd9965630b335aca3ef9bced7a0f2a4390f2e960 Mon Sep 17 00:00:00 2001 From: James P Date: Tue, 13 Aug 2024 09:01:22 -0400 Subject: [PATCH] chore: Add autofix to PRs (#2010) * Adds autofixing before linting * add install step * remove ci step * rename because "security" * rename * I don't understand CI * maybe this works * Remove Lint in favor of autofix --- .../workflows/{lint.yaml => autofix.ci.yaml} | 22 ++++++++++--------- .github/workflows/pr.yaml | 8 ------- 2 files changed, 12 insertions(+), 18 deletions(-) rename .github/workflows/{lint.yaml => autofix.ci.yaml} (62%) diff --git a/.github/workflows/lint.yaml b/.github/workflows/autofix.ci.yaml similarity index 62% rename from .github/workflows/lint.yaml rename to .github/workflows/autofix.ci.yaml index 30648fff83..82df563d81 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/autofix.ci.yaml @@ -1,14 +1,19 @@ -name: Lint +name: autofix.ci on: - workflow_call: + pull_request: + push: + branches: ["main"] +permissions: + contents: read jobs: - lint_code: - name: Code + autofix: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 - name: Install uses: ./.github/actions/install @@ -16,12 +21,9 @@ jobs: ts: true go: true - - run: pnpm biome ci . - - - name: Go vet - run: go vet ./... - working-directory: apps/agent + - run: pnpm biome format . --write && pnpm biome check . --apply + - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a lint_docs: name: Docs runs-on: ubuntu-latest diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c823a97aef..ca1d931bd5 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -7,12 +7,7 @@ on: branches: [main] workflow_dispatch: - jobs: - lint: - name: Lint - uses: ./.github/workflows/lint.yaml - test_packages: name: Test Packages uses: ./.github/workflows/unit_test.yaml @@ -24,6 +19,3 @@ jobs: test_api: name: Test API uses: ./.github/workflows/job_test_api_local.yaml - - - \ No newline at end of file