-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOC: Update README adding "Usage" and "History" sections
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,44 @@ | |
This GitHub composite action verifies that commit messages conform to the | ||
[Slicer commit style](https://slicer.readthedocs.io/en/latest/developer_guide/style_guide.html#commits) | ||
guidelines. | ||
|
||
## Usage | ||
|
||
To automatically enforce the Slicer commit message style during pull requests or | ||
pushes to the `main` branch, create a workflow file at | ||
`.github/workflows/check-commit-message.yml` with the following content: | ||
|
||
```yaml | ||
name: "Commit Message Check" | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
check-commit-message: | ||
name: Check Commit Message | ||
uses: slicer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
This workflow will trigger commit message checks on relevant pull request events | ||
or when changes are pushed to the `main` branch. | ||
|
||
## History | ||
|
||
This action was originally implemented by | ||
[@jamesobutler](https://github.com/jamesobutler), | ||
[@pieper](https://github.com/pieper) and [@jcfr](https://github.com/jcfr) in the | ||
Slicer repository under `.github/workflows/commit-message.yml`. |