Skip to content

Commit

Permalink
Chore: add commit message check
Browse files Browse the repository at this point in the history
  • Loading branch information
luohoufu committed Dec 5, 2024
1 parent bfdaa86 commit c9a27d9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/commit-message-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'commit-message-check'
on:
pull_request:

jobs:
check-commit-message:
name: check-subject
runs-on: ubuntu-latest
steps:
- name: check-subject-type
uses: gsactions/commit-message-checker@v2
with:
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
excludeDescription: 'true' # optional: this excludes the description body of a pull request
excludeTitle: 'true' # optional: this excludes the title of a pull request
accessToken: ${{ secrets.GITHUB_TOKEN }}
pattern: '^(Change:|Feature:|Improve:|Perf:|Dep:|Doc:|Test:|CI:|Refactor:|Fix:|Fixdoc:|Fixup:|Merge|BumpVer:|Chore:|Build\(deps\):) .+$'
flags: 'gm'
error: |
Subject line has to contain a commit type, e.g.: "Change: blabla" or a merge commit e.g.: "Merge xxx".
Valid types are:
Change - API breaking change
Feature - API compatible new feature
Improve - Become better without functional changes
Perf - Performance improvement
Dep - dependency update
Doc - doc update
Test - test udpate
CI - CI workflow update
Refactor - refactor without function change.
Fix - fix bug
Fixdoc - fix doc
Fixup - minor change: e.g., fix sth mentioned in a review.
BumpVer - Bump to a new version.
Chore - Nothing important.
Build(deps) - bot: dependabot.

0 comments on commit c9a27d9

Please sign in to comment.