Skip to content

Commit 44518c9

Browse files
committed
🐞fix(config): fix issue #17
命令只支持单 repo 的情况,局限于 vscode API 无非获取当前激活的 repo,多 repo 只能通过 icon 来触发。
1 parent e7aee1e commit 44518c9

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

assets/icon.svg

Lines changed: 1 addition & 1 deletion
Loading

assets/icon_light.svg

Lines changed: 1 addition & 1 deletion
Loading

src/extension.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ export function activate(context: vscode.ExtensionContext) {
4040
}
4141
//组合信息 Portfolio information
4242
function messageCombine(config: GitMessage) {
43-
return [
44-
`${config.type}${config.scope ? '(' + config.scope + ')' : ''}: ${config.subject}`,
45-
config.body,
46-
config.footer
47-
].filter(item => item).join('\n');
43+
return [`${config.type}${config.scope ? '(' + config.scope + ')' : ''}: ${config.subject}`, config.body, config.footer]
44+
.filter((item) => item)
45+
.join('\n');
4846
}
4947
const gitExtension = getGitExtension();
5048
if (!gitExtension?.enabled) {
@@ -54,6 +52,8 @@ export function activate(context: vscode.ExtensionContext) {
5452

5553
//获取当前的 git仓库实例 Get git repo instance
5654
let repo: any = gitExtension.getAPI(1).repositories[0];
55+
console.log(repo, 'repo');
56+
5757
//输入提交详情 Input message detail
5858
const inputMessageDetail = (_key: string | number) => {
5959
const _detailType = CommitDetailType.find((item) => item.key === _key);

0 commit comments

Comments
 (0)