From 0b50f731c3d4e90b31433dd9e7a0b41f6c22cc8e Mon Sep 17 00:00:00 2001 From: Kevin Aleman Date: Mon, 22 Nov 2021 09:29:40 -0600 Subject: [PATCH] Chore: Add PR title check (#663) --- .github/pr-title-checker-config.json | 10 ++++++++++ .github/workflows/pr-title-checker.yml | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .github/pr-title-checker-config.json create mode 100644 .github/workflows/pr-title-checker.yml diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json new file mode 100644 index 000000000..18d804d48 --- /dev/null +++ b/.github/pr-title-checker-config.json @@ -0,0 +1,10 @@ +{ + "LABEL": { + "name": "Invalid PR Title", + "color": "B60205" + }, + "CHECKS": { + "regexp": "^(?:(?:\\[(NEW|BREAK|IMPROVE|FIX)\\](\\[(ENTERPRISE|APPS)\\])?|(?:Regression|Chore|Bump):) .+|Release [0-9]+\\.[0-9]+\\.[0-9]+)", + "ignoreLabels" : ["[ignore-title]"] + } +} \ No newline at end of file diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml new file mode 100644 index 000000000..e8260a641 --- /dev/null +++ b/.github/workflows/pr-title-checker.yml @@ -0,0 +1,12 @@ +name: "PR Title Checker" +on: + pull_request: + types: [opened, edited] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: thehanimo/pr-title-checker@v1.2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file