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+
134name : Commit Message Check
235
336on :
740permissions :
841 contents : read
942
43+ concurrency :
44+ group : ${{ github.workflow }}-${{ github.ref }}
45+ cancel-in-progress : true
46+
1047jobs :
1148 check-commit-message :
1249 runs-on : ubuntu-latest
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
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