diff --git a/.github/workflows/title_validation.yml b/.github/workflows/title_validation.yml new file mode 100644 index 00000000..6879ac5c --- /dev/null +++ b/.github/workflows/title_validation.yml @@ -0,0 +1,40 @@ +# See https://github.com/amannn/action-semantic-pull-request +name: 'PR Title is Conventional' + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + contents: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + permissions: + pull-requests: read + statuses: write + steps: + - uses: amannn/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 # v4.6.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + build + chore + ci + docs + feat + fix + perf + refactor + revert + style + test + subjectPattern: ^[A-Z].+$ + subjectPatternError: | + The subject of the PR must begin with an uppercase letter.