Everduin94 / better-commits

A CLI for creating better commits following the conventional commits specification
MIT License
1.96k stars 69 forks source link

Missing description body #84

Closed Wh-Marc closed 6 months ago

Wh-Marc commented 7 months ago

The description body still show when I'm using better-commit in cli. But it disappeared after commit. It also disappeared in github UI. Just show only short description

image

Everduin94 commented 7 months ago

@Wh-Marc - What is your

Operating System: Terminal / Shell:

Wh-Marc commented 7 months ago

Im using Windows 10 with new terminal and powershell

Everduin94 commented 7 months ago

@Wh-Marc - I believe you're seeing this issue: https://github.com/Everduin94/better-commits?tab=readme-ov-file#multi-line

I don't use Windows or Powershell so it's hard for me to test. But, if I remember correctly windows / powershell has issues with multiple lines. So setting the underlying shell (see that config example) to something like bash I believe can fix the issue.

Let me know if that works.

Wh-Marc commented 7 months ago

thanks. It works fine now. but I think we need the option if the path to git bash is not found, show error and use the default. Because I use window at work and linux at home and obviously the override path will be wrong in linux

vanbeonhv commented 7 months ago

Hi, this is my personal account. This is open-source right? actually I can help on this. So the feature can be:

If path to override shell is not found, show option to select whether continue committing with default shell or exit.

I saw the err message contain ENOENT. It means no such file or directory. I can base on this to solve. Is this ok? @Everduin94

Everduin94 commented 7 months ago

@Wh-Marc - Ah good point. I'm guessing you're using a repository-level config, correct?

@vanbeonhv - Yes it's open source :). We more-or-less just need to do a fs.existsSync call on the override path before trying to use it in fs.execSync.

vanbeonhv commented 7 months ago

yep. repo-level give me option to custom scope for each repo. Btw, I finished the update but it said that I don't have permission to push. Can u grant me?

vanbeonhv commented 7 months ago

sorry for dump ass question. this is my first time with open-source. I created a pr #85 to solve this.

Everduin94 commented 7 months ago

@vanbeonhv - No worries on the question. A fork is not very intuitive the first time!

I oversimplified the change in my response. After looking at your changes I realized it's going to require some new logic. If we do add your change at a stop-gap. I would like to omit the warnings, extra-prompt, etc... IMO it just needs to default silently like all the other features. I can help with that on the PR when I get the chance.

The issue is this. If multiple users are working on a repository, it's very likely the location of their bash.exe is different (or they're on mac / linux and shouldn't use the override at all). i.e. A repository config shouldn't control something that is on a per-user basis. - The same goes for a new feature I recently added. It determines whether or not to complete the commit via your $EDITOR. That's pretty specific personal preference.

I need to add the ability for a user's global configuration to override some properties in a repository config. Today, the repository config always wins out. Although, I'm not 100% sure how I want to implement this yet.

vanbeonhv commented 7 months ago

I see. Your considering is correct. We need a more helpful feature for personal config. Anyway, if you have any new idea, can mention me. I really want to help on this issue.

vanbeonhv commented 7 months ago

I think can raise this as new issue. maybe others can have ideal. thanks

github-actions[bot] commented 6 months ago

:tada: This issue has been resolved in version 1.14.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Everduin94 commented 6 months ago

@Wh-Marc @vanbeonhv - Updated so that your global config will be considered for specific properties like overrides.

@Wh-Marc - You should be able to remove overrides from your repository config. Then, only on your Windows machine, set the shell path in overrides in your $HOME/.better-commits.json file.

Let me know if you have any issues.