forked from os-autoinst/os-autoinst
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.69 KB
/
Copy pathcommit_message_checker.yml
File metadata and controls
42 lines (41 loc) · 1.69 KB
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
35
36
37
38
39
40
41
42
---
# https://github.com/marketplace/actions/gs-commit-message-checker
name: 'Commit Message Check'
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Subject Begining
uses: gsactions/commit-message-checker@v1
with:
pattern: '^([A-Z]|[A-Za-z0-9_/.]+:|git subrepo pull)'
flags: 'g'
error: 'The subject does not start with a capital or tag.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check Subject Line Length
uses: gsactions/commit-message-checker@v1
with:
pattern: '^.{1,72}(\n|$)'
flags: 'g'
error: 'The maximum subject line length of 72 characters is exceeded.'
excludeDescription: 'true' # excludes the description body of a pull request
excludeTitle: 'true' # excludes the title of a pull request
excludeMergeCommits: 'true' # optional: this excludes merge commits
checkAllCommitMessages: 'true' # checks all commits associated with a pull request
accessToken: ${{ secrets.GITHUB_TOKEN }} # only required if checkAllCommitMessages is true
- name: Check Empty Line
uses: gsactions/commit-message-checker@v1
with:
pattern: '^.*(\n\n|$)'
flags: 'g'
error: 'No newline between title and description.'
excludeDescription: 'true'
excludeTitle: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}