question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gitmoji -c with husky pre-commit

See original GitHub issue

Hello @carloscuesta!

Hi, first of all, amazing lib 💛

Issue: When I commit and husky pre-commit hook fails it’s easy to fix the issue and press arrow up and my single line commit message is there, but with gitmoji -c i have to do it all over again.

I know this is not a bug, but is there a harmonic way to integrate husky with gitmoji -c? (I haven’t tried the gitmoji hook, because I have not officially introduced gitmoji to my project, I’m just testing waters with the team)

OS: macOS Big Sur gitmoji -v: 4.7.0 Node version: 14.17.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
carloscuestacommented, Nov 21, 2021

I see! I think both options are useful but depending your use-case the hook approach might be a better choice.

I will try to update and reflect this on the docs 😊

1reaction
carloscuestacommented, Oct 31, 2021

Hello again!

And in 2, the terminal finishes with an error, saves the title/message in a file, and when the user types something like gitmoji --retry the cli executes the last gitmoji command with all the values from the file.

This option is a great idea 😊

We should save the last full command into a temporary file and then re-execute it with the --retry flag. Not sure if there’s another potential approach but maybe we can use conf for that?

https://github.com/sindresorhus/conf

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add Commit Hooks to Git with Husky to Automate ...
Git hooks are scripts that you can set up to run at certain events in the Git lifecycle. These events include different stages...
Read more >
husky-git-emoji - npm
A little command line tool that use husky to replace tag to emoji. With this tool all your commit created with the Angular...
Read more >
Committing fails in Git hooks pre-commit because the node ...
Your setup seems to be using husky for pre-commit hooks, so to ensure you have the right Node ... SET PATH=C:\Program Files\Nodejs;%PATH%.
Read more >
gitmoji | An emoji guide for your commit messages
Gitmoji is an emoji guide for your commit messages. Aims to be a standarization cheatshee /t for using emojis on GitHub's commit messages....
Read more >
Améliorez vos messages de commits avec husky et commitlint ...
Commitlint est, comme son nom l'indique, un linter de (message de) commit, c'est-à-dire qu'il va analyser le texte qui lui sera transmis.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found