From be53de27488a5bd2e9a274a89ba307ebba390c99 Mon Sep 17 00:00:00 2001 From: Korbinian Stoemmer Date: Mon, 12 Feb 2024 16:59:42 +0100 Subject: [PATCH] add lint rules for PR titles --- .github/dependabot.yml | 6 ++++ .github/workflows/lint-conventional-prs.yml | 31 +++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/lint-conventional-prs.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f549012..0cbe4a8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,11 +9,17 @@ updates: directory: "/" # Location of package manifests schedule: interval: "daily" + commit-message: + prefix: "deps(dependabot)" - package-ecosystem: "docker" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "daily" + commit-message: + prefix: "deps(dependabot)" - package-ecosystem: "github-actions" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "daily" + commit-message: + prefix: "deps(dependabot)" diff --git a/.github/workflows/lint-conventional-prs.yml b/.github/workflows/lint-conventional-prs.yml new file mode 100644 index 0000000..fcc54df --- /dev/null +++ b/.github/workflows/lint-conventional-prs.yml @@ -0,0 +1,31 @@ +name: Lint PR Title +run-name: ${{github.event.pull_request.title}} + +on: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +jobs: + check: + name: Check Title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@47b15d52c5c30e94a17ec87eb8dd51ff5221fed9 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + deps + chore + docs + feat + fix + refactor + test + requireScope: false + # https://regex101.com/r/YybDgS/1 + subjectPattern: ^([A-Z].*[^.]|bump .*)$