From df5b79a1a428f2e8d9a705af2303113876d316f2 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Wed, 19 Mar 2025 20:24:26 +0100 Subject: [PATCH] Move run-eslint to PR Manager workflow --- .github/workflows/pr-auto-manager.yml | 35 ++++++++++++++++++++++ .github/workflows/pr-run-eslint.yml | 43 --------------------------- 2 files changed, 35 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/pr-run-eslint.yml diff --git a/.github/workflows/pr-auto-manager.yml b/.github/workflows/pr-auto-manager.yml index 261c5b069..d95ff8e73 100644 --- a/.github/workflows/pr-auto-manager.yml +++ b/.github/workflows/pr-auto-manager.yml @@ -11,6 +11,41 @@ permissions: pull-requests: write jobs: + run-eslint: + name: ✅ Check ESLint on PR + runs-on: ubuntu-latest + # Only needs to run when code is changed + if: github.event.action == 'opened' || github.event.action == 'synchronize' + + steps: + - name: Checkout Repository + # Checkout + # https://github.com/marketplace/actions/checkout + uses: actions/checkout@v4.2.2 + + - name: Setup Node.js + # Setup Node.js environment + # https://github.com/marketplace/actions/setup-node-js-environment + uses: actions/setup-node@v4.3.0 + with: + node-version: 20 + + - name: Run npm install + run: npm ci + + - name: Run ESLint + # Action ESLint + # https://github.com/marketplace/actions/action-eslint + uses: sibiraj-s/action-eslint@v3.0.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + eslint-args: '--ignore-path=.gitignore --quiet' + extensions: 'js,ts' + annotations: true + ignore-patterns: | + dist/ + lib/ + label-by-size: name: 🏷️ Label PR by Size # This job should run after all others, to prevent possible concurrency issues diff --git a/.github/workflows/pr-run-eslint.yml b/.github/workflows/pr-run-eslint.yml deleted file mode 100644 index 4e30608c9..000000000 --- a/.github/workflows/pr-run-eslint.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: ✅ Check ESLint on PR - -on: - pull_request: # TODO: change to pull_request_target for 'staging' - types: [opened, synchronize] - -permissions: - contents: read - pull-requests: write - -jobs: - run-eslint: - name: ✅ Check ESLint on PR - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - # Checkout - # https://github.com/marketplace/actions/checkout - uses: actions/checkout@v4.2.2 - - - name: Setup Node.js - # Setup Node.js environment - # https://github.com/marketplace/actions/setup-node-js-environment - uses: actions/setup-node@v4.3.0 - with: - node-version: 20 - - - name: Run npm install - run: npm ci - - - name: Run ESLint - # Action ESLint - # https://github.com/marketplace/actions/action-eslint - uses: sibiraj-s/action-eslint@v3.0.1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - eslint-args: '--ignore-path=.gitignore --quiet' - extensions: 'js,ts' - annotations: true - ignore-patterns: | - dist/ - lib/