From 18889244e1f50263c898964260d7baf95915ee78 Mon Sep 17 00:00:00 2001 From: Kevin Barnoin Date: Wed, 22 Nov 2023 18:09:42 +0100 Subject: [PATCH] feat: pr title checker (#843) * feat: pr title checker * fix: update ci trigger scope --- .github/pr-title-checker-config.json | 15 +++++++++++++++ .github/workflows/pr-title-check.yml | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/pr-title-checker-config.json create mode 100644 .github/workflows/pr-title-check.yml diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json new file mode 100644 index 0000000000..e4a77ff741 --- /dev/null +++ b/.github/pr-title-checker-config.json @@ -0,0 +1,15 @@ +{ + "LABEL": { + "name": "title needs formatting", + "color": "EEEEEE" + }, + "CHECKS": { + "prefixes": ["fix: ", "feat: ", "refactor: ", "chore: "], + "regexp": "docs\\(v[0-9]\\): " + }, + "MESSAGES": { + "success": "PR title OK", + "failure": "Failing CI test", + "notice": "" + } +} diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml new file mode 100644 index 0000000000..a13f4f0626 --- /dev/null +++ b/.github/workflows/pr-title-check.yml @@ -0,0 +1,19 @@ +name: "PR Title Checker" +on: + pull_request: + types: + - opened + - edited + - synchronize + - labeled + - unlabeled + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: thehanimo/pr-title-checker@v1.4.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + pass_on_octokit_error: false + configuration_path: .github/pr-title-checker-config.json #(optional. defaults to .github/pr-title-checker-config.json)