diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml new file mode 100644 index 0000000000..5f11c118ae --- /dev/null +++ b/.github/workflows/pr-title-check.yml @@ -0,0 +1,47 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Configure which types are allowed (newline delimited). + # Default: https://github.com/commitizen/conventional-commit-types + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + + # Configure which scopes are allowed (newline delimited). + scopes: | + controller + dashboard + trafficrouting + analysis + metricprovider + experiments + deps + example + cli + + # Configure that a scope must always be provided. + requireScope: false