|
name: PR Lint |
|
|
|
on: |
|
pull_request: |
|
types: [opened, edited, synchronize, reopened] |
|
|
|
permissions: |
|
pull-requests: read |
|
|
|
jobs: |
|
pr-title: |
|
name: PR title (Conventional Commits) |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Validate PR title |
|
uses: amannn/action-semantic-pull-request@v5 |
|
env: |
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
with: |
|
types: | |
|
build |
|
chore |
|
ci |
|
docs |
|
feat |
|
fix |
|
perf |
|
refactor |
|
revert |
|
style |
|
test |
|
requireScope: false |
|
subjectPattern: ^[a-z].+[^.]$ |
|
subjectPatternError: | |
|
Subject "{subject}" must start with a lowercase letter and must not |
|
end with a period. |
|
Example: "feat(cli): add init subcommand" |
|
|
|
commits: |
|
name: Commit messages |
|
runs-on: ubuntu-latest |
|
steps: |
|
- uses: actions/checkout@v4 |
|
with: |
|
fetch-depth: 0 |
|
- uses: wagoid/commitlint-github-action@v6 |