File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 3
3
This GitHub composite action verifies that commit messages conform to the
4
4
[ Slicer commit style] ( https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits )
5
5
guidelines.
6
+
7
+ ## Usage
8
+
9
+ To automatically enforce the Slicer commit message style during pull requests or
10
+ pushes to the ` main ` branch, create a workflow file at
11
+ ` .github/workflows/check-commit-message.yml ` with the following content:
12
+
13
+ ``` yaml
14
+ name : " Commit Message Check"
15
+ on :
16
+ pull_request :
17
+ types :
18
+ - opened
19
+ - edited
20
+ - reopened
21
+ - synchronize
22
+ push :
23
+ branches :
24
+ - main
25
+
26
+ permissions :
27
+ contents : read
28
+ pull-requests : read
29
+
30
+ jobs :
31
+ check-commit-message :
32
+ name : Check Commit Message
33
+ uses : slicer/slicer-check-commit-message-action@v1.0.0
34
+ with :
35
+ token : ${{ secrets.GITHUB_TOKEN }}
36
+ ` ` `
37
+
38
+ This workflow will trigger commit message checks on relevant pull request events
39
+ or when changes are pushed to the ` main` branch.
40
+
41
+ # # History
42
+
43
+ This action was originally implemented by
44
+ [@jamesobutler](https://github.com/jamesobutler),
45
+ [@pieper](https://github.com/pieper) and [@jcfr](https://github.com/jcfr) in the
46
+ Slicer repository under `.github/workflows/commit-message.yml`.
You can’t perform that action at this time.
0 commit comments