Skip to content

Commit 5ff5daf

Browse files
authored
Merge pull request #660 from IceflowRE/iceflower/commit_naming
Simplify commit naming
2 parents dfba64e + 76030c5 commit 5ff5daf

3 files changed

Lines changed: 12 additions & 62 deletions

File tree

‎.github/helper/commit_validator.mjs‎

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
name: Commit Naming
22
on:
3+
push:
34
pull_request:
45
types: [opened, synchronize, reopened]
56

67
jobs:
78
naming:
89
name: Commit Naming
9-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-slim
1011
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.merged }}
1112
steps:
12-
- uses: IceflowRE/gitcc@v2
13+
- uses: IceflowRE/gitcc@v3
1314
with:
14-
validator_file: .github/helper/commit_validator.mjs
15+
validator: "regex"
16+
options: |
17+
summary: "^[A-Z0-9]\S*(?:\s\S*)+[^.!?,\s]$"

‎documentation/source/contributing/contribute-code.rst‎

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,19 @@ Commit Naming Convention
1919

2020
The commit naming convention will be checked by our continuous integration. In order to be valid, the following rules must all be fulfilled:
2121

22-
- The commit message must begin with a category in square brackets which describes the code part that was changed
23-
- The commit category must not be empty
24-
- A commit category must contain at least two characters. Allowed characters are: letters ``a-z``, numbers ``0-9``, and ``-``. For example ``[gpu-texture]``
25-
- If two code parts are affected, separate the categories using ``|``, for example ``[gpu-texture|gpu-info]``
26-
- If three or more code parts are affected, use ``[*]`` as category
27-
- Leave one space after the commit category
2822
- The commit message itself must consist of the following characters: letters ``a-z``, numbers ``0-9``
2923
- The commit message must begin with a capital letter
3024
- The commit message must exist and it must not be empty
3125
- The commit message must not end with ``.``, ``!`` or ``?``
3226

3327
**Examples**
3428

35-
- ``[docs] Explain commit naming convention``
36-
- ``[gpu-info] Don't display empty gpu info queries as error``
37-
- ``[gpu-info|representation] Cleanup``
38-
- ``[ci] Add commit naming check``
39-
- ``[*] Move GPU info to vk tools``
29+
- ``Explain commit naming convention``
30+
- ``Don't display empty gpu info queries as error``
31+
- ``Cleanup octree vertices and indices``
32+
- ``Add commit naming check``
33+
- ``Move GPU info to vk tools``
4034

4135
**Additional Information**
4236

43-
The regex pattern for the commit category is ``\*|(?:[a-z0-9]{2,}[\s|-]?)+``, the pattern for the message is ``[A-Z0-9].+[^.!?,\s]``
37+
The Regex pattern for the message is ``^[A-Z0-9]\S*(?:\s\S*)+[^.!?,\s]$``

0 commit comments

Comments
 (0)