Skip to content
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

Add '--yes' or '-y' option to automatically accept AI generated commit messages #216

Open
KennethLG opened this issue May 18, 2023 · 2 comments
Labels
feature New feature or request pending triage

Comments

@KennethLG
Copy link

Feature request

I propose to add a --yes or -y option to the aic command line utility, which will allow users to automatically accept the first AI generated commit message without requiring interactive input. This feature will be especially useful when aic is integrated into automation scripts or other environments where manual input is not convenient or possible.

Currently, when a user runs aic, they are presented with one or multiple AI-generated commit messages and are asked to select one. While this is a great feature for manual use, it becomes a bottleneck when trying to automate the Git commit process as it requires an interactive terminal to make a choice.

Why?

The problem I am addressing with this feature is the lack of an automation-friendly interface for aic. I am currently developing a script that monitors a directory for changes, automatically stages and commits those changes using aic for commit messages. However, the lack of an option to automatically accept an AI generated message is preventing me from fully automating this process.

I believe this feature would increase the flexibility and usability of aic, not only for my use case but also for other developers who wish to include aic into their automated workflows.

Alternatives

No response

Additional context

I am willing to contribute to this feature's development. I have reviewed the project's source code and have an understanding of where and how this new feature could be integrated. However, I would appreciate guidance and feedback from the project maintainers to ensure my contribution aligns with the project's standards and conventions.

@oregonpillow
Copy link

oregonpillow commented Oct 3, 2023

I found a workaround for now, install the commit hook in the repository aicommits hook install then you can do something like this:

git add -A && git commit --allow-empty-message --no-edit && git push

--allow-empty-message is not really required, but if something goes wrong maybe it will still commit empty
--no-edit is needed to suppress git from trying to open the text editor e.g nano, to edit the commit message

Edit:
I think this is better. If aicommits fails, use date as commit message

git add -A && git commit --no-edit || git commit -m "$(date)" && git push

@AlexanderKozhevin
Copy link

yep, I want this feature too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request pending triage
Projects
None yet
Development

No branches or pull requests

3 participants