Skip to content

Commit 3b4f65d

Browse files
fix: 修复默认模版问题
1 parent 448b915 commit 3b4f65d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/fulinlin/constant/GitCommitConstants.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
**/
88
public class GitCommitConstants {
99

10-
public static final String ACTION_SUFFIX = "";
10+
public static final String ACTION_SUFFIX = " ";
1111

1212
public static final String ACTION_PREFIX = "$APP_CONFIG$/GitCommitMessageHelperSettings";
1313

14-
public static final String DEFAULT_TEMPLATE = "#if($type)${type}#end#if($scope)(${scope})#end: #if($subject)${subject}#end\n" +
15-
"#if($body)${newline}${newline}${body}#end\n" +
16-
"#if($changes)${newline}${newline}BREAKING CHANGE: ${changes}#end\n" +
17-
"#if($closes)${newline}${newline}Closes ${closes}#end\n";
14+
public static final String DEFAULT_TEMPLATE = "#if($type)${type}#end#if($scope)(${scope})#end: #if($subject)${subject}#end" +
15+
"#if($body)${newline}${newline}${body}#end" +
16+
"#if($changes)${newline}${newline}BREAKING CHANGE: ${changes}#end" +
17+
"#if($closes)${newline}${newline}Closes ${closes}#end";
1818
}

src/main/java/com/fulinlin/utils/VelocityUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static String convert(String template, CommitTemplate commitTemplate) {
4141
velocityContext.put("closes", commitTemplate.getCloses());
4242
velocityContext.put("newline", "\n");
4343
velocityContext.put("velocityTool", new VelocityTool());
44-
String VM_LOG_TAG = "Leetcode VelocityUtils";
44+
String VM_LOG_TAG = "GitCommitMessage VelocityUtils";
4545
boolean isSuccess = engine.evaluate(velocityContext, writer, VM_LOG_TAG, template);
4646
if (!isSuccess) {
4747
}

0 commit comments

Comments
 (0)