Skip to content

Commit

Permalink
enhance(commit.ts): improve push success message readability
Browse files Browse the repository at this point in the history
The success message for pushing commits now highlights the remote name with additional styling. This change enhances the readability and visual appeal of the success message when commits are pushed to a remote repository.
  • Loading branch information
SHSharkar committed Nov 25, 2023
1 parent a8f9337 commit 928477e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 14 additions & 4 deletions out/cli.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33935,10 +33935,16 @@ ${source_default.grey("\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2
});
if (isPushConfirmedByUser && !eD2(isPushConfirmedByUser)) {
const pushSpinner = de();
pushSpinner.start(`${source_default.black.bold.bgBlue(` INFO `)} Running 'git push ${remotes[0]}...'`);
pushSpinner.start(
`${source_default.black.bold.bgBlue(` INFO `)} Running git push ${source_default.black.bold.bgBlue(
` ${remotes[0]} `
)}`
);
const { stdout: stdout2 } = await execa("git", ["push", "--verbose", remotes[0]]);
pushSpinner.stop(
`${source_default.black.bold.bgGreen(` SUCCESS `)} Successfully pushed all commits to ${remotes[0]}.`
`${source_default.black.bold.bgGreen(
` SUCCESS `
)} Successfully pushed all commits to ${source_default.bold.blue.bgGreen(` ${remotes[0]} `)}.`
);
if (stdout2)
$e(stdout2);
Expand All @@ -33953,12 +33959,16 @@ ${source_default.grey("\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2
});
if (!eD2(selectedRemote)) {
const pushSpinner = de();
pushSpinner.start(`${source_default.black.bold.bgBlue(` INFO `)} Running 'git push ${selectedRemote}...'`);
pushSpinner.start(
`${source_default.black.bold.bgBlue(` INFO `)} Running git push ${source_default.black.bold.bgBlue(
` ${selectedRemote} `
)}`
);
const { stdout: stdout2 } = await execa("git", ["push", selectedRemote]);
pushSpinner.stop(
`${source_default.black.bold.bgGreen(
` SUCCESS `
)} Successfully pushed all commits to ${selectedRemote}.`
)} Successfully pushed all commits to ${source_default.bold.black.bgGreen(` ${selectedRemote} `)}.`
);
if (stdout2)
$e(stdout2);
Expand Down
6 changes: 4 additions & 2 deletions src/commands/commit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ ${chalk.grey('——————————————————————
const { stdout } = await execa('git', ['push', '--verbose', remotes[0]]);

pushSpinner.stop(
`${chalk.black.bold.bgGreen(` SUCCESS `)} Successfully pushed all commits to ${remotes[0]}.`,
`${chalk.black.bold.bgGreen(
` SUCCESS `,
)} Successfully pushed all commits to ${chalk.bold.blue.bgGreen(` ${remotes[0]} `)}.`,
);

// eslint-disable-next-line max-depth
Expand Down Expand Up @@ -124,7 +126,7 @@ ${chalk.grey('——————————————————————
pushSpinner.stop(
`${chalk.black.bold.bgGreen(
` SUCCESS `,
)} Successfully pushed all commits to ${selectedRemote}.`,
)} Successfully pushed all commits to ${chalk.bold.black.bgGreen(` ${selectedRemote} `)}.`,
);

// eslint-disable-next-line max-depth
Expand Down

0 comments on commit 928477e

Please sign in to comment.