Skip to content

Commit d5ba20b

Browse files
committed
DOC: Update README adding "Usage" and "History" sections
1 parent 3cb846a commit d5ba20b

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,44 @@
33
This GitHub composite action verifies that commit messages conform to the
44
[Slicer commit style](https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits)
55
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`.

0 commit comments

Comments
 (0)