opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

Commits in IntelliJ Idea (and other JetBrains IDEs)

Open Marc-R2 opened this issue 2 years ago • 5 comments
trafficstars

Is there any way to use the hook functionality in IntelliJ Idea as well?

I have set the hook and it works. But not when I call or execute Commit within the IDE.

So far I have found the following:

  • That there used to be a plugin that could call this hook, but has not been developed for years and is therefore no longer compatible. Plugin Page

  • That there used to be a setting for hooks in 'Version Control' -> 'Commit' -> 'Before Commit'. intellij-support

Marc-R2 avatar Mar 29 '23 12:03 Marc-R2

i believe JetBrains should have some config for opening a file to add a commit message, like VSCode does. when file is opened, OC would generate a commit and paste it into the file

check this out https://github.com/di-sukharev/opencommit/issues/1#issuecomment-1463546118

di-sukharev avatar Mar 30 '23 07:03 di-sukharev

Thank you very much for the answer.

I really couldn't let go yesterday and tried everything to get it to work somehow. Without success. Apparently, there is really no way to execute the prepare-commit-msg hook in IntelliJ Idea. (Without doing it manually)

Thanks a lot for your effort and this great tool. I always find it fascinating what AI can do today and how it makes so many things so much easier and more enjoyable. This is especially true for commit messages.

For the other IntelliJ IDE users:

Nevertheless, I found a slightly different solution, which I added my own touch: The AI Commit Plugin adds a little colorful tick above the commit field in the UI, which fills it at the push of a button based on the selected changes (well, it also makes a request to the gpt-3.5-turbo-0301 API, which then fills it in). I wasn't quite happy with the UX of this plugin (and still not quite) and created a Fork with some changes, a diif. prompt and more visual feedback. Maybe this is helpful for one or the other.

Marc-R2 avatar Mar 30 '23 10:03 Marc-R2

I wasn't quite happy with the UX of this plugin (and still not quite) and created a Fork with some changes, a diif. prompt and more visual feedback.

@Marc-R2 How to install your forked version to intellij idea?

MutahharAllshore avatar Apr 04 '23 18:04 MutahharAllshore

@MutahharAllshore On the Release page of the repo, there is currently pre-release version 5.1.0, which you can download as a zip from the assets. You can manually install the zip in your IntelliJ IDE in the Plugin Manager via the Gear -> 'Install Plugin from Disk'.

Update: Now also easy to install via the Plugin Store.

Marc-R2 avatar Apr 05 '23 07:04 Marc-R2

Stale issue message

github-actions[bot] avatar May 19 '23 21:05 github-actions[bot]