-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Break into smaller commits #114
Comments
I agree it's not the best currently for a lot of changes, although in my case I'm running into where all the stuff I work on is related to one feature/item, but I have a lot of changes to that feature/item, so another option could be (if possible) have it try to identify the feature (or features), and split it up by that, make a summary of the feature, and then add the individual changes in the lines bellow. I don't know if that's possible, but I think that would honestly work the best. If that's not possible, maybe an option to generate a message for you (but not commit) to copy paste and then you can write the summary yourself. I know you can go in an amend the commit, but might be easier to not have to. |
you could just stash and |
You can, however like mentioned it doesn't generate a summary of all changes, so you'd have to go in and amend the commit message every time, not to mention I noticed default behavior is to push the committed code so if you accidentally select yes to that then you'd have more problems. That's why at the very least it would be nice if their was an option to output it's generated messages instead of immediately committing them so a person could write a summary easily. |
Yeah this can all be done manually, the idea is developers are lazy and ai could potentially automate the tedious part of separating files/code into individual commits. |
I came looking exactly for that, my projects usually require lots of changes for a single feature and the commit message ends up being huge, plus things like For example, check this automatically generated release notes, it's quite a mess: https://github.com/kamushadenes/chloe/releases/tag/v0.6 |
@kamushadenes that's a cool project. Looks further along than the other "AGI" task-based projects I've seen on GitHub. (Sorry getting off topic) |
@Christopher-Hayes thanks! This has been my pet project for a couple weeks now. I would love to hear some feedback and ideas if you have ;) Regarding the release notes, I ended up doing this: https://github.com/kamushadenes/chloe/blob/main/.github/scripts/release-notes.py Not perfect, but seems to handle well this specific case. For example, it went from this: To this: |
Stale issue message |
Is this issue resolved? TBH this is the only issue preventing me from using this regularly. I tried some of the work arounds (commit one by one, using the action, trying to resolve this in the changelog). None of them are clean enough for me to work :D So just wondering what your thoughts on this are. |
I think the current status of this is "Help Wanted". I'd love to try implementing this, just haven't had the time to dig in. |
Description
Right now,
oc
generates one commit with a message relevant to one change/file, and the git description will mention multiple files with different changes.For example, here is a git description that was generated:
Suggested Solution
One option is to break each file into its own separate commits. Not really the ideal way to use git and would need some hard-limits on how many commits it will make at once, but the commit messages would be more useful, and it seems relatively straight-forward if GPT's response is consistent.
Alternatives
Another, more advanced option is to have GPT step through
git add --patch
. It would take some tweaking, but it would allow GPT to intelligently break up changes into separate commits if a file has changes that would logically be separated into different commits.Additional Context
This would make sense as an option in the CLI, so by default it would be off. Users using git properly wouldn't be running commit for multiple, different code changes. But, since this doesn't always happen in practice, this is a great opportunity for GPT ai to do the tedious work of grouping similar changes into separate commits.
The text was updated successfully, but these errors were encountered: