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 an option to accept whatever the suggestion is #239

Open
davidawad opened this issue Aug 9, 2023 · 4 comments
Open

Add an option to accept whatever the suggestion is #239

davidawad opened this issue Aug 9, 2023 · 4 comments
Labels
feature New feature or request pending triage

Comments

@davidawad
Copy link

Feature request

I want aicommits to have an option to just take yes for an answer as a flag and take the generated commit message without bothering to ask yes / no as a separate prompt.

for example:

aicommits -y

Why?

(hypothetically) I don't care what the commit message is sometimes, I want the message written but don't want to bother with validating it.

Alternatives

alternative is to feed a key from the shell to hit yes.

Additional context

No response

@davidawad davidawad added feature New feature or request pending triage labels Aug 9, 2023
@davidawad
Copy link
Author

Here's a workaround for anyone who's looking to do this, make an expect script:

#!/usr/bin/expect

spawn aicommits

expect "Use this commit message?"

send "\r"

interact

This sends an 'enter' keypress to the command when it asks for the commit message which will work.

Make this script executable and throw it in the path and you can just call it within the directory you're in.

@negoziator
Copy link

I was thinking to just enable it for all messages. I can clearly see your idea as well.

I can alter my PR here - and add that possibility as well.

Or i can make a new PR that only allows your suggestion.

@negoziator
Copy link

@davidawad I've forked the repo, since this seems to no longer be maintained.

https://www.npmjs.com/package/@negoziator/ai-commit

In my version you can set it to auto-confirm commit messages 😄

aicommit config set auto-confirm=true

@wayneschuller
Copy link

Yes I would really like this feature!

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