diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json new file mode 100644 index 0000000000..d372e02374 --- /dev/null +++ b/.github/pr-title-checker-config.json @@ -0,0 +1,10 @@ +{ + "LABEL": { + "name": "Invalid PR Title", + "color": "B60205" + }, + "CHECKS": { + "regexp": "^(feat|fix|test|refactor|chore|style|doc|perf|build|ci|revert)(\\(.*\\))?:.*", + "ignoreLabels" : ["ignore-title"] + } +} diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml new file mode 100644 index 0000000000..68828ed894 --- /dev/null +++ b/.github/workflows/pr-title-checker.yml @@ -0,0 +1,19 @@ +name: "PR Title Checker" +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - labeled + - unlabeled + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: thehanimo/pr-title-checker@v1.3.4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + pass_on_octokit_error: false + configuration_path: ".github/pr-title-checker-config.json"