diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json new file mode 100644 index 0000000..a1c37ac --- /dev/null +++ b/.github/pr-title-checker-config.json @@ -0,0 +1,17 @@ +{ + "LABEL": { + "name": "title needs formatting", + "color": "EEEEEE" + }, + "CHECKS": { + "prefixes": ["fix: ", "feat: ", "test: ", "infra: ", "doc: ", "change: ", "break: ", "breaking: ", "deprecation: ", "feature: ", "depr: ", "documentation: "], + "regexp": "docs\\(v[0-9]\\): ", + "regexpFlags": "i", + "ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"] + }, + "MESSAGES": { + "success": "All OK", + "failure": "Failing CI test", + "notice": "" + } +} diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml new file mode 100644 index 0000000..a20344a --- /dev/null +++ b/.github/workflows/pr-title-checker.yml @@ -0,0 +1,31 @@ +name: "PR Title Checker" + +on: + push: + branches: + - main + pull_request: + branches: + - main + - feature/** + pull_request_target: + types: + - opened + - edited + - synchronize + - labeled + - unlabeled + +permissions: + pull-requests: write + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: "Check PR Title" + 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)