diff --git a/.github/workflows/pr-title.yaml b/.github/workflows/pr-title.yaml new file mode 100644 index 0000000..385fc3e --- /dev/null +++ b/.github/workflows/pr-title.yaml @@ -0,0 +1,37 @@ +name: PR Title + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + branches: [main] + +permissions: + pull-requests: read + +jobs: + conventional-commits: + name: Validate PR title (Conventional Commits) + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + chore + docs + style + refactor + perf + test + build + ci + revert + requireScope: false + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + The subject "{subject}" found in the pull request title "{title}" + didn't match the configured pattern. Please ensure that the subject + doesn't start with an uppercase character.