From 85e2437300669ba196b1945c8e2d2f0cff4cda4a Mon Sep 17 00:00:00 2001 From: Konrad Szwarc Date: Sun, 29 Jan 2023 12:23:36 +0100 Subject: [PATCH] Use GitHub action instead of an app for validating PR title --- .github/semantic.yml | 7 ------- .github/workflows/lint-pr-title.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) delete mode 100644 .github/semantic.yml create mode 100644 .github/workflows/lint-pr-title.yml diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index a9d1ca9..0000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,7 +0,0 @@ -titleOnly: true -types: - - feat - - fix - - chore - - refactor - - docs diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml new file mode 100644 index 0000000..5795b06 --- /dev/null +++ b/.github/workflows/lint-pr-title.yml @@ -0,0 +1,26 @@ +name: 'Lint PR title' + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + lint: + name: Validate PR title + if: github.repository == 'KonradSzwarc/devscard' + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + chore + refactor + docs + requireScope: false