commit_message.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. name: Check commit message
  2. concurrency:
  3. group: commit-${{ github.event_name }}-${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. pull_request:
  7. types:
  8. - opened
  9. - edited
  10. - reopened
  11. - synchronize
  12. jobs:
  13. check_commit_message:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Check Type
  17. uses: gsactions/commit-message-checker@v2
  18. with:
  19. pattern: '^(feat|fix|docs|style|refactor|chore|perf|test|build|ci|revert)(\(.*\))?:'
  20. error: 'Commit type must be one of the following: feat|fix|docs|style|refactor|chore|perf|test|build|ci|revert.'
  21. excludeDescription: true
  22. - name: Check Format
  23. uses: gsactions/commit-message-checker@v2
  24. with:
  25. pattern: '^(\w+)(\([^()]+\))?:\s(.+)$'
  26. error: 'Your commit message is not formatted, check the docs for more details: https://ekuiper.org/docs/en/latest/CONTRIBUTING.html#commit-message-guidelines'
  27. excludeDescription: true
  28. - name: Check Length
  29. uses: gsactions/commit-message-checker@v2
  30. with:
  31. pattern: '^.{5,50}$'
  32. error: 'The maximum commit title length of 50 characters is exceeded.'
  33. excludeDescription: true