Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Git command if it failed #681

Merged

Conversation

capsuleman
Copy link
Contributor

Description

If commit fails to execute, cli prints command so it can be copy / paste without executing again gitmoji-cli.
Updated the tests too.

Issue: #680

Tests

  • All tests passed.

@carloscuesta
Copy link
Owner

carloscuesta commented Sep 13, 2021

Hey!

Thanks for opening a PR

Is there any difference between copying the command from the output of the error and using the arrow up key to replicate the same comand without having to manually copy&pasting it? IMHO using arrow key should be much faster, so I don't really see the point of this 🤔

@capsuleman
Copy link
Contributor Author

Hey!

Thanks for opening a PR

Is there any difference between copying the command from the output of the error and using the arrow up key to replicate the same comand without having to manually copy&pasting it? IMHO using arrow key should be much faster, so I don't really see the point of this thinking

When I use gitmoji -c, I do not provide any other parameters and enter gitmoji and message in the cli. If I use arrow up key, I can not find again the parameters I filled previously.
If there is a quick way without copy/paste, I would be happy to hear it! :-)

@carloscuesta
Copy link
Owner

I think a screenshot/demo about this would be really helpful 😊

@capsuleman
Copy link
Contributor Author

output.mp4

@carloscuesta
Copy link
Owner

Thanks for sharing! But this is the current behaviour right? I was asking for a demo of your change to see what is printed, thank you 🙏🏼

@capsuleman
Copy link
Contributor Author

Oh sorry, I was just wondering if I was using the cli well. With the new version the command would be printed if it fail

simplescreenrecorder-2021-09-16_18.39.48.mp4

@carloscuesta
Copy link
Owner

carloscuesta commented Sep 19, 2021

Thanks for sharing the demo!

Currently, we have a way for specifying the default parameters through the cli. With this you can retry the command faster if it fails as prefills all the questions from the cli.

Screen Shot 2021-09-19 at 10 06 50

I'm not 100% if this is worth to be added into the cli, as it shows the underlying command and we should "abstract" that to the user 😅

@capsuleman
Copy link
Contributor Author

Yes sure, but often I think about the gitmoji, title and message after having typed gitmoji -c...
Would you prefer having the command with default values printed? Is there a parameter to provide a gitmoji?

@codecov
Copy link

codecov bot commented Oct 2, 2021

Codecov Report

Merging #681 (05f5b77) into master (d3ad2eb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #681   +/-   ##
=======================================
  Coverage   92.13%   92.13%           
=======================================
  Files          26       26           
  Lines         229      229           
  Branches       49       49           
=======================================
  Hits          211      211           
  Misses         17       17           
  Partials        1        1           
Impacted Files Coverage Δ
src/commands/commit/withClient/index.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3ad2eb...05f5b77. Read the comment docs.

Copy link
Owner

@carloscuesta carloscuesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it 😊

@carloscuesta carloscuesta merged commit e514231 into carloscuesta:master Oct 2, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants