Compare commits

..

3 Commits

Author SHA1 Message Date
di-sukharev
5a0a384cbe 1.0.6 2023-03-09 21:25:49 +08:00
di-sukharev
a8839353f7 * chore(commit.ts): add spinner to indicate git push process
* refactor(commit.ts): change success message to include spinner in `git push` process
2023-03-09 21:25:38 +08:00
di-sukharev
88006b8693 * fix(commit.ts): add check for cancelation of git push confirmation prompt 2023-03-09 21:23:58 +08:00
3 changed files with 7 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "open-commit",
"version": "1.0.5",
"version": "1.0.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-commit",
"version": "1.0.5",
"version": "1.0.6",
"license": "ISC",
"dependencies": {
"@clack/prompts": "^0.6.1",

View File

@@ -1,6 +1,6 @@
{
"name": "opencommit",
"version": "1.0.5",
"version": "1.0.6",
"description": "AI generates conventional commits with mind-blowing accuracy.",
"keywords": [
"git",

View File

@@ -51,9 +51,11 @@ ${chalk.grey('——————————————————')}`
message: 'Do you want to run `git push`?'
});
if (isPushConfirmedByUser) {
if (isPushConfirmedByUser && !isCancel(isPushConfirmedByUser)) {
const pushSpinner = spinner();
pushSpinner.start('Running `git push`');
const { stdout } = await execa('git', ['push']);
outro(`${chalk.green('✔')} successfully pushed all commits`);
pushSpinner.stop(`${chalk.green('✔')} successfully pushed all commits`);
outro(stdout);
}
} else outro(`${chalk.gray('✖')} process cancelled`);