Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
38 lines (37 loc) · 1.97 KB
/
Copy pathaction.yml
File metadata and controls
38 lines (37 loc) · 1.97 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
name: "Commit Message Check"
description: "Check Commit Messages match Slicer style"
inputs:
token:
description:
"GitHub access token used to list and check all pull request commits"
required: true
runs:
using: "composite"
steps:
- name: Check Commit Prefix
uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0
with:
pattern: "^(ENH|PERF|BUG|STYLE|DOC|COMP): ([A-Z])+"
flags: "gm"
excludeDescription: "true" # optional: this excludes the description body of a pull request
excludeTitle: "true" # optional: this excludes the title of a pull request
error:
'The first line has to start with a commit prefix, followed by a colon
and space, and then followed by a message with a capital letter (e.g
"ENH: Add support for awesome feature"). For more details on other
requirements, see
https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits'
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
accessToken: ${{ inputs.token }} # github access token is only required if checkAllCommitMessages is true
- name: Check Line Length
uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0
with:
pattern: "^[^#].{1,78}$"
error:
"The maximum line length of 78 characters is exceeded. For more
details, see
https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits"
excludeDescription: "true" # optional: this excludes the description body of a pull request
excludeTitle: "true" # optional: this excludes the title of a pull request
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
accessToken: ${{ inputs.token }} # github access token is only required if checkAllCommitMessages is true