-
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.
chore: Check commit messages as GitHub action
- Since Standard Version isn't able to correctly identify what the new version of a package should be when the commit message begins with an unknown type, this new GitHub action will cause PRs to have a failing build when any commit contains an unsupported commit type.
- Loading branch information
1 parent
8daa06a
commit 169ea29
Showing
2 changed files
with
42 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'Check Commit Message' | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-commit-message: | ||
name: Check Commit Message | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Commit begins with supported commit type | ||
uses: gsactions/commit-message-checker@v1 | ||
with: | ||
pattern: '^(feat|fix|docs|style|refactor|test|chore).+' | ||
error: 'Commit messages must begin with a valid commit type. See "Commit Style" under CONTRIBUTING.md for more details.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.GITHUB_TOKEN }} |
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