Skip to content

Commit fc799b8

Browse files
authored
feat: New keyboard shortcut to commit without pushing (#59)
Co-authored-by: lf <logical>
1 parent af47da5 commit fc799b8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/main.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ if (isDevelopment) {
7777
}),
7878
commit: debounce(async function () {
7979
hidePopup();
80-
commit(true, `[logseq-plugin-git:commit] ${new Date().toISOString()}`);
80+
await commit(true, `[logseq-plugin-git:commit] ${new Date().toISOString()}`);
81+
checkStatus();
8182
}),
8283
push: debounce(async function () {
8384
setPluginStyle(LOADING_STYLE);
@@ -192,6 +193,17 @@ if (isDevelopment) {
192193
});
193194
}
194195

196+
logseq.App.registerCommandPalette(
197+
{
198+
key: "logseq-plugin-git:commit",
199+
label: "Commit",
200+
keybinding: {
201+
binding: "alt+shift+s",
202+
mode: "global",
203+
},
204+
},
205+
() => operations.commit()
206+
);
195207
logseq.App.registerCommandPalette(
196208
{
197209
key: "logseq-plugin-git:commit&push",

0 commit comments

Comments
 (0)