Hi Hackers,
About 10 days ago, I came across the #GitHubHack23 post and then I thought: "Hmm... ain't I got something to contribute?" ā squinting ...
For further actions, you may consider blocking this person and/or reporting abuse
cool idea! I've been trying to get my team to write better commits, but it didn't really work š
Obligatory xkcd.com/1296/
lol true, you start with good and finish with
ui
hihi, thanks, that happens, lol :) if you try and like (or don't) OpenCommit as an Action for the whole team repo ā please leave me a feedback in the issues
Nice work, Dima! I can see myself using this in the future. Would it be possible to also generate a PR description as well? Like when someone creates a pull request an action will be triggered that will generate a description based on the changes.
+1 That would be great for PRs also.
gonna do the PRs, also thought about it :) fully automated git pipelines
next opencommit is doing is writing code for you and committing it after AI-TDD tests pass
This is very cool, this part in particular where you're generating the commit message based on the diff and how the prompt for that is constructed with one example, it would be interesting to see the output if the prompt's example is based on the programming languages used in the diff.
thank you bro! i also like the code, try it out as a Github Action :)
Hey, this is a pretty clever use of GPT. I can see how this could really help in maintaining a clean and coherent commit history. As someone who sometimes gets a bit lazy with commit messages, I might give it a shot. Thanks for your work on this!
that's great, I was so bored with lame messages like
fixed
and `done ā so i created this tool i use everydayAnd thus deprive future LLMs of training data. Or, rather, force future LLMs data pipelines to learn throwing away previous LLM-generated data from the training set, letting through only the human-generated commit messages. N-n-nice! This is how the new technology's tail strikes you hard at the forehead when you think you're running up front. Cool! That's something to philosophise about!
hahah :)
so, we do not need to create commit messages manually anymore at all.. š„ great idea
That was my idea of like getting rid of manually coming up with a clever commit message yourself, i guess future developers will remember our generation as the last one who created commit messages manually :)
Any tedious, lenient process that can be automated, should be automated. Love this idea!
So, you commit with whatever message you want, and the Action rewrites your commits? Am I understanding that right?
If so, you then have to reset your local repo every time so you have the new commit messages and don't get merge conflicts.
That sounds incredibly complicated. Why not build it as a
prepare-commit-message
hook so it's done locally?it doesn't create any conflicts, you can check the demo :)
and well it's open source, so i would be extremely happy if you contribute your ideas, cause
prepare-commit-message
is a smart thing to implement as an optionBut you had to do a
git pull --rebase
which, it would seem, wiped out the original commit, probably because it's now empty. If you'd done justgit pull
, without the rebase, you'd have a conflict.All this rewriting of history after it's been pushed to a public remote repo seems pretty messy.
no bro, if you do
pull --no-rebase
it's same, no conflicts are there because opencommit doesn't change any code, only message. SHA becomes different, but git doesnt create any conflicts you would need to solve, because code is same.. all good :)Do your docs have any before and after graphic of how the Action changes the branch commits?
My first reaction was the same, that this would create a problem with my local branch being 1 commit ahead and behind the remote, but I don't think I understand what the Action is actually doing.
I hope I will try it someday) cool work!
Btw, Can you make this action as a GitHub hook for Husky for example? Or as a standalone app maybe. Is it possible to run it locally? Because we don't use GitHub and someone maybe doesn't use GitLab, etc. So it will be great to have some local solution
sure, you can set it up as a cli
npm i -g opencommit
and then just runoco
in any repo :)Ive Been doing this for a few weeks now but with gitlab merges instead. Doings a diff of the source and destination branch and getting GPT to list changes in each file, why it's done and a summary overall. Also asked for emoji's to make it more fun. Using GPT4, it's spitting out really great summaries that definitely improve the review process. Nice idea with opencommit!
thank you man :)
I'm waiting for git staging version of OpenCommit nowš
Wait my bad, I didn't look deeply into this, but there's CLI version š¤
Time to use that!
Always happy to clarify things š
Do I need a paid chagpt account?
you use you own openAI api, they give you $15 free credits which is ~2 months opencommit usage. then you bind a card and pay for your own requests
Kudos!