diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml new file mode 100644 index 0000000..9ecea02 --- /dev/null +++ b/.github/workflows/pr-title-check.yml @@ -0,0 +1,35 @@ +name: PR Title Check + +on: + pull_request_target: + types: [opened, edited, synchronize, reopened] + +jobs: + validate-title: + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - name: Validate PR title + uses: amannn/action-semantic-pull-request@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + docs + chore + refactor + style + test + perf + ci + build + requireScope: false + subjectPattern: ^.+$ + subjectPatternError: | + The subject must not be empty. + validateSingleCommit: false + ignoreLabels: | + skip-changelog