From 56948fe7c23d5c5885c9e170fb46f585248d4e39 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Fri, 7 Mar 2025 10:48:56 +0100 Subject: [PATCH] fix(ci): run lint pr title on title change (#2872) --- .github/workflows/lint-code.yml | 20 ++++++++++++++++ .../{linting.yml => lint-pr-title.yml} | 24 +++++-------------- 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/lint-code.yml rename .github/workflows/{linting.yml => lint-pr-title.yml} (56%) diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml new file mode 100644 index 000000000..5bea65066 --- /dev/null +++ b/.github/workflows/lint-code.yml @@ -0,0 +1,20 @@ +name: Linting PR + +on: + pull_request: + +jobs: + lint-code: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + cache: 'pnpm' + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Run Linter + run: pnpm lint diff --git a/.github/workflows/linting.yml b/.github/workflows/lint-pr-title.yml similarity index 56% rename from .github/workflows/linting.yml rename to .github/workflows/lint-pr-title.yml index fafde006b..67a095027 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/lint-pr-title.yml @@ -2,26 +2,14 @@ name: Linting PR on: pull_request: - branches: - - '**' + types: + - opened + - edited + - synchronize + - reopened jobs: - lint-code: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - cache: 'pnpm' - - - name: Install Dependencies - run: pnpm install --frozen-lockfile - - - name: Run Linter - run: pnpm lint - - lint-PR-title: + lint-pr-title: name: PR Title Lint runs-on: ubuntu-latest steps: