|
@@ -9,10 +9,10 @@ import cn.seecoder.web.core.commit.model.CommitType;
|
|
|
* @date 2021/3/22
|
|
* @date 2021/3/22
|
|
|
* @description:
|
|
* @description:
|
|
|
* 需要约束的commit规范
|
|
* 需要约束的commit规范
|
|
|
- * feat: working on #123456, users can leave the group now. (pass)
|
|
|
|
|
- * feat: complete #123456. (pass)
|
|
|
|
|
- * fix: fixing on #123456, users can log out successfully now. (pass)
|
|
|
|
|
- * fix: fix #123456, users can log out successfully now. (pass)
|
|
|
|
|
|
|
+ * feat: working on #123456#, users can leave the group now. (pass)
|
|
|
|
|
+ * feat: complete #123456#. (pass)
|
|
|
|
|
+ * fix: fixing on #123456#, users can log out successfully now. (pass)
|
|
|
|
|
+ * fix: fix #123456#, users can log out successfully now. (pass)
|
|
|
*/
|
|
*/
|
|
|
public class CommitResolver {
|
|
public class CommitResolver {
|
|
|
/**
|
|
/**
|
|
@@ -61,7 +61,7 @@ public class CommitResolver {
|
|
|
|
|
|
|
|
String state = title.substring(colon+1, pound);
|
|
String state = title.substring(colon+1, pound);
|
|
|
for ( CommitState t: CommitState.values()) {
|
|
for ( CommitState t: CommitState.values()) {
|
|
|
- if ( state.trim().contains(t.toString())){
|
|
|
|
|
|
|
+ if ( state.trim().equals(t.toString())){
|
|
|
return t;
|
|
return t;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -78,9 +78,9 @@ public class CommitResolver {
|
|
|
}
|
|
}
|
|
|
int id;
|
|
int id;
|
|
|
title = title.substring(pound+1);
|
|
title = title.substring(pound+1);
|
|
|
- int space = title.indexOf(' ');
|
|
|
|
|
- if (space != -1){
|
|
|
|
|
- title = title.substring(0,space);
|
|
|
|
|
|
|
+ pound = title.indexOf('#');
|
|
|
|
|
+ if (pound != -1){
|
|
|
|
|
+ title = title.substring(0,pound);
|
|
|
}
|
|
}
|
|
|
try{
|
|
try{
|
|
|
id = Integer.parseInt(title);
|
|
id = Integer.parseInt(title);
|