Skip to content

Commit 4a9cc35

Browse files
committed
feat: Allowing to use commitManager.push() without calling commitManager.commit() first
Signed-off-by: Jaid <jaid.jsx@gmail.com>
1 parent cb81e52 commit 4a9cc35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ export default class {
107107
* @return {Promise<void>}
108108
*/
109109
async push() {
110+
const isDirty = await isGitRepoDirty()
111+
if (isDirty) {
112+
await this.commit()
113+
}
110114
if (!this.commits) {
111115
return
112116
}

0 commit comments

Comments
 (0)