-
Notifications
You must be signed in to change notification settings - Fork 19
Feature: Auto Commit Flag #97
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
Changes from all commits
551b9a5
8631741
fdb4a15
ab5c917
81227b7
8a1b592
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -57,7 +57,12 @@ var creatCommitMsg = &cobra.Command{ | |||||
| if err != nil { | ||||||
| return err | ||||||
| } | ||||||
| CreateCommitMsg(dryRun) | ||||||
|
|
||||||
| autoCommit, err := cmd.Flags().GetBool("auto") | ||||||
| if err != nil { | ||||||
| return err | ||||||
| } | ||||||
| CreateCommitMsg(dryRun, autoCommit) | ||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| return nil | ||||||
| }, | ||||||
| } | ||||||
|
|
@@ -76,6 +81,9 @@ func init() { | |||||
| // Add --dry-run flag to the commit command | ||||||
| creatCommitMsg.Flags().Bool("dry-run", false, "Preview the prompt that would be sent to the LLM without making an API call") | ||||||
|
|
||||||
| // Add --auto flag to the commid command | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix typo in comment. "commid" should be "commit". Apply this diff: - // Add --auto flag to the commid command
+ // Add --auto flag to the commit command📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| creatCommitMsg.Flags().Bool("auto", false, "Automatically commit with the generated message") | ||||||
|
|
||||||
| rootCmd.AddCommand(creatCommitMsg) | ||||||
| rootCmd.AddCommand(llmCmd) | ||||||
| llmCmd.AddCommand(llmSetupCmd) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify auto-commit behavior regarding interactive review.
The documentation states that
--autowill "Skip the interactive review and manual confirmation step" (line 148), but the implementation incmd/cli/createMsg.gostill presents the interactive loop (accept/regenerate/edit/exit) and only auto-commits after the user accepts the message.The actual behavior is:
--autowas passed)This is safer than skipping review entirely, but the documentation should accurately reflect this flow.
Consider revising the documentation to clarify:
This will:
+- Present the interactive review for you to accept, regenerate, or edit
git commitwith the generated message-- Skip the interactive review and manual confirmation step
+- Skip the manual
git commitstep after acceptanceIn README.md around lines 137 to 166, the docs incorrectly state that
--autoskips the interactive review; update the text to reflect the actual flow:
generate the commit message, present the interactive review
(accept/regenerate/edit/exit), and if the user accepts, automatically run
git commit(i.e., skip the manual git commit step only after acceptance). Replacethe line that says "Skip the interactive review and manual confirmation step"
with wording that clarifies the interactive review is still shown and that
--autoonly bypasses the manualgit commitafter acceptance; keep the noteabout
--dry-runprecedence and platform support as-is.