aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/commit-message-check.yml
blob: 6aa5bc7249bcdfe3da9b90c2683c4cb0bddc02ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: 'Commit Message Check'
on:
  pull_request:
    types:
      - opened
      - edited
      - reopened
      - synchronize
  push:
    branches:
      - master
      - 'releases/*'

jobs:
  check-commit-message:
    name: Check Commit Message
    runs-on: ubuntu-latest
    steps:
#     - name: Check Commit Type
#       uses: gsactions/commit-message-checker@v1
#       with:
#         pattern: '\[[^]]+\] .+$'
#         flags: 'gm'
#         error: 'Your first line has to contain a commit type like "[BUGFIX]".'
      - name: Check Line Length
        uses: gsactions/commit-message-checker@v1
        with:
          pattern: '^[^#].{78}'
          error: 'The maximum line length of 78 characters is exceeded.'
#     - name: Check for Resolves / Fixes
#       uses: gsactions/commit-message-checker@v1
#       with:
#         pattern: '^.+(Resolves|Fixes): \#[0-9]+$'
#         error: 'You need at least one "Resolves|Fixes: #<issue number>" line.'