/ scripts / .github / workflows / conventional-commits.yml
conventional-commits.yml
 1  name: Conventional Commits
 2  
 3  on:
 4    pull_request:
 5      types: [opened, edited, synchronize]
 6  
 7  permissions:
 8    pull-requests: read
 9  
10  jobs:
11    validate:
12      name: Validate PR Title
13      runs-on: ubuntu-latest
14      steps:
15        - name: Check PR title follows conventional commits
16          uses: amannn/action-semantic-pull-request@v6
17          env:
18            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19          with:
20            # Configure allowed types
21            types: |
22              feat
23              fix
24              docs
25              chore
26              test
27              refactor
28              style
29              perf
30              build
31              ci
32              revert
33            # Require scope to be lowercase
34            requireScope: false
35            # Allow scopes (optional)
36            scopes: |
37              core
38              cli
39              id
40              index
41              verifier
42              nostr
43              storage
44              attestation
45              identity
46              deps
47              ci
48            # Ensure the subject doesn't start with uppercase
49            subjectPattern: ^(?![A-Z]).+$
50            subjectPatternError: |
51              The subject "{subject}" should not start with an uppercase letter.
52              Please use lowercase (e.g., "add feature" not "Add feature").