forked from apache/geronimo-yoko
-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (38 loc) · 1.7 KB
/
check-commit-message.yml
File metadata and controls
38 lines (38 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 2025 IBM Corporation and others.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an \"AS IS\" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: 'Commit Message Check'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
check-commit-message:
name: Check Commit Message
runs-on: self-hosted
steps:
- name: Check Commit Type
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(build|ci|chore|docs|feat|fix|perf|refactor|revert|style|test)(\([^\)]*\))?!?: [^A-Z](.*[^.])?$'
flags: 'gm'
error: 'Commit messages MUST follow the conventional commit style, e.g. "fix: a bug" or "chore(deps): update BCEL version". Valid qualifiers are build, ci, chore, docs, feat, fix, perf, refactor, revert, style, or test.'
excludeTitle: 'true' # optional: this excludes the title of a pull request
excludeDescription: 'true' # optional: this excludes the description body of a pull request
checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true