Skip to content

Commit f9f29f9

Browse files
committed
update
1 parent 77f0f50 commit f9f29f9

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

.github/workflows/commit-message-check.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# --------------------------------------------------------------------
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed
5+
# with this work for additional information regarding copyright
6+
# ownership. The ASF licenses this file to You under the Apache
7+
# License, Version 2.0 (the "License"); you may not use this file
8+
# except in compliance with the License. You may obtain a copy of the
9+
# License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16+
# implied. See the License for the specific language governing
17+
# permissions and limitations under the License.
18+
#
19+
# --------------------------------------------------------------------
20+
# Commit Message Check
21+
# --------------------------------------------------------------------
22+
# Checks the commit messages for a pull request to ensure they follow
23+
# the project's guidelines. This is not a required check and will not
24+
# block the PR from being merged. It provides suggestions for improving
25+
# commit messages.
26+
#
27+
# The main checks include:
28+
# * Title length (recommended: 50 characters or less)
29+
# * Title capitalization (should start with an uppercase letter)
30+
# * Body presence (should not be empty)
31+
# * Body line length (recommended: 72 characters or less)
32+
# --------------------------------------------------------------------
33+
134
name: Commit Message Check
235

336
on:
@@ -7,6 +40,10 @@ on:
740
permissions:
841
contents: read
942

43+
concurrency:
44+
group: ${{ github.workflow }}-${{ github.ref }}
45+
cancel-in-progress: true
46+
1047
jobs:
1148
check-commit-message:
1249
runs-on: ubuntu-latest
@@ -16,6 +53,7 @@ jobs:
1653
fetch-depth: 0
1754

1855
- name: Check commit messages
56+
shell: bash
1957
run: |
2058
PR_COMMITS=$(git log --format="%H" ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})
2159
@@ -82,4 +120,4 @@ jobs:
82120
if [[ "$HAS_ISSUES" == "true" ]]; then
83121
echo "### Note" >> $GITHUB_STEP_SUMMARY
84122
echo "These suggestions are for reference only and won't block PR merging. Consider using the project's .gitmessage template." >> $GITHUB_STEP_SUMMARY
85-
fi
123+
fi

0 commit comments

Comments
 (0)