Giter Club home page Giter Club logo

Comments (11)

ljnsn avatar ljnsn commented on June 12, 2024

Yes, it's possible, it's set up in this repo itself 🙂

You need to slightly adjust the example from the commitizen docs and add extra_requirements: "cz-conventional-gitmoji". You can check the workflow here. You might be interested in configuring the bump message to have a gitmoji too.

from cz-conventional-gitmoji.

jjfantini avatar jjfantini commented on June 12, 2024

Okay thanks! I haven't been able to get it to work, and I have a package version in the GitHub sidebar.

I have tried to use cz_customize with custom values, bump map etc, but to no avail!

I will try again tomorrow, and let you know how it goes! I appreciate the help.

If I can't get it to work, would you be open to helping me set this up in a python package template?

I really like the use of vscode-commitizen plugin, to make committing easy and integrate into the software. using the CLI and having to git add . and then type cz commit and cycle through can add a lot of extra time. I am interested how you setup your workflow to do this!

I am willing to pay hahah I've been trying to set this up for a while now...

from cz-conventional-gitmoji.

jjfantini avatar jjfantini commented on June 12, 2024

I am running into this error on bump:

Notice:  A new release of pip is available: 23.0.1 -> 23.3.2
Notice:  To update, run: pip install --upgrade pip
Commitizen version: 3.13.0
cz --no-raise 21 bump --yes --changelog --check-consistency --changelog-to-stdout >body.md
'cz_gitmoji' rule does not support bump

This happened when I use the cz commit CLI interface, and when I use commitizen plugin and when I use the text bar in source control on Cursor IDE.

Is there a way to fix this?

Check the error here

from cz-conventional-gitmoji.

jjfantini avatar jjfantini commented on June 12, 2024

I am trying to integrate this workflow of commits into this cookie-cutter template

from cz-conventional-gitmoji.

ljnsn avatar ljnsn commented on June 12, 2024

This error happens, because you set major_version_zero = true in your config. I'll have to look into why it fails with that, but for now it should work if you remove that setting.

If I can't get it to work, would you be open to helping me set this up in a python package template?

I don't have the time at the moment, but I hope you will be able to now 🙂

I really like the use of vscode-commitizen plugin, to make committing easy and integrate into the software. using the CLI and having to git add . and then type cz commit and cycle through can add a lot of extra time. I am interested how you setup your workflow to do this!

I don't know about this vscode plugin, personally I use lazygit for most things git related. But it doesn't matter what you use, as long as you have the pre commit hook installed, the gitmoji will be prepended automatically and you don't have to cycle through the options.

from cz-conventional-gitmoji.

jjfantini avatar jjfantini commented on June 12, 2024

Hmmm, it still does not pickup or correctly lint the commit to generate a new release? I guess that is the rules setup by cz-conventional-gitmoji

You can check this commit triggered the action from the branch, but then says

Notice:  A new release of pip is available: 23.0.1 -> 23.3.2
Notice:  To update, run: pip install --upgrade pip
Commitizen version: 3.13.0
cz --no-raise 21 bump --yes --changelog --check-consistency --changelog-to-stdout >body.md
🔖 bump(release): v0.2.0 → v0.2.0
tag to create: v0.2.0

[NO_COMMITS_TO_BUMP]
The commits found are not eligible to be bumped
Repository: jjfantini/gitmoji-test
Actor: jjfantini
Not pushing
Done.

for this commit 🥳 feat(test): texting ruff exe this should trigger a version bump

from cz-conventional-gitmoji.

jjfantini avatar jjfantini commented on June 12, 2024

You can also see here that when i run a hotfix(test): adding gitmoji hook message. The hook still doesn't add the emoji to the commit?

The only thing that has worked so far has been the CLI using cz commit. ANything else has not worked, with commitizen. BUt it is still just a commit and passed the commitizen checks? So not sure why emoji wouldn't append?? 🙈

from cz-conventional-gitmoji.

jjfantini avatar jjfantini commented on June 12, 2024

It seems to be working when using the text input as writing my own custom commit, and including emojis myself. The gitmojify hook isn't working,

So,

CLI looks to be working and bumping, the emojis are included in the commit with CLI tool, no need for gitmojify
Message bar in VSCode/ CURsor is working, manually writing emojis in, gitmojify is not working

from cz-conventional-gitmoji.

ljnsn avatar ljnsn commented on June 12, 2024

for this commit 🥳 feat(test): texting ruff exe

this is not the gitmoji for a feature, either ✨ feat:... or just feat:... would trigger a bump.

hotfix(test): adding gitmoji hook

Yea, for this commit a gitmoji should be added (and is added for me).

Just to be clear, the pre-commit hook to add the gitmoji needs to run locally, this is not something that happens in CI (in case that's what you were expecting).

It seems to be working when using the text input as writing my own custom commit, and including emojis myself. The gitmojify hook isn't working,

Not sure what you mean by that, the point of the pre commit hook is to add the gitmoji automatically.

from cz-conventional-gitmoji.

ljnsn avatar ljnsn commented on June 12, 2024

I would recommend you to set up a very simple repo, add commitizen and this plugin to it and make sure all functionality works. Something like what I described here. From there on you can gradually add the rest of your customizations.

Did you run this sequence of steps and do you get a gitmoji added to the commit message?

poetry new foo
cd foo
git init
poetry add pre-commit
# add your cz config to pyproject.toml
# add your pre-commit config
pre-commit install --install-hooks  --hook-type commit-msg
git add .
git commit -m "init: initial version"
# commit message: 🎉 init: initial commit

from cz-conventional-gitmoji.

ljnsn avatar ljnsn commented on June 12, 2024

@jjfantini can this be closed? I think the original question has been answered.

from cz-conventional-gitmoji.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.