We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ad941a commit b30d012Copy full SHA for b30d012
1 file changed
src/config/commit-type.ts
@@ -1,10 +1,13 @@
1
-import { QuickPickItem } from 'vscode';
+import { workspace, QuickPickItem } from 'vscode';
2
3
/**
4
* @description git commit 提交类型
5
*/
6
export interface CommitType extends QuickPickItem {}
7
-const CommitType: Array<CommitType> = [
+
8
+const isShowEmoji = workspace.getConfiguration('showGitCommit').get<boolean>('showEmoji');
9
10
+let CommitType: Array<CommitType> = [
11
{
12
label: '✨feat',
13
detail: '添加新特性'
@@ -50,4 +53,13 @@ const CommitType: Array<CommitType> = [
50
53
detail: '回滚到上一个版本'
51
54
}
52
55
];
56
57
+if (!isShowEmoji) {
58
+ CommitType = CommitType.map(commitType => {
59
+ const labelArr = [...commitType.label];
60
+ labelArr.shift();
61
+ commitType.label = labelArr.join('');
62
+ return commitType;
63
+ });
64
+}
65
export default CommitType;
0 commit comments