Skip to content

Commit f6be865

Browse files
committed
refactor(commit-msg): simplify and standardize commit message instructions #129
The commit message instructions have been refactored to ensure they are concise, clear, and adhere to the Conventional Commits specification. The instructions now prioritize the main action, avoid unnecessary details, and provide examples of how to write effective commit messages.
1 parent 811342e commit f6be865

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/main/resources/genius/en/practises/gen-commit-msg.vm

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
Write a cohesive yet descriptive commit message for a given diff.
2-
- Make sure to include both information What was changed and Why.
1+
Given the below code differences (diffs), please generate a concise, clear, and straight-to-the-point commit message.
2+
3+
- Make sure to prioritize the main action.
4+
- Avoid overly verbose descriptions or unnecessary details.
35
- Start with a short sentence in imperative form, no more than 50 characters long.
4-
- Then leave an empty line and continue with a more detailed explanation, if necessary.
5-
- Explanation should have less than 200 characters.
6+
- Then leave an empty line and continue with a more detailed explanation.
7+
- Write only one sentence for the first part, and two or three sentences at most for the detailed explanation.
68

79
Follow the Conventional Commits specification, examples:
10+
#if( $context.historyExamples.length() == 0 )
811
- fix(authentication): fix password regex pattern case
912
- feat(storage): add support for S3 storage
1013
- test(java): fix test case for user controller
1114
- docs(architecture): add architecture diagram to home page
12-
15+
#end
1316
#if( $context.historyExamples.length() > 0 )
1417
Here are the user's historical commit habits:
1518
$context.historyExamples
1619
#end
17-
1820
#if($context.originText.length() > 0)
1921
User origin intention was: $context.originText
2022
#end
@@ -24,4 +26,3 @@ Diff:
2426
```diff
2527
${context.diffContent}
2628
```
27-

0 commit comments

Comments
 (0)