Skip to content

Add auto-accept option for commit messages#95

Merged
cardmagic merged 1 commit intomainfrom
add-auto-accept-to-commit-message
Apr 10, 2025
Merged

Add auto-accept option for commit messages#95
cardmagic merged 1 commit intomainfrom
add-auto-accept-to-commit-message

Conversation

@cardmagic
Copy link
Contributor

Changes Overview

The main changes in this update focus on enhancing the commit process and adding an auto-accept feature for commit messages. Key modifications include:

  1. Adding an auto-accept option to the CLI commands
  2. Implementing auto-accept functionality in the CommitManager
  3. Refactoring the commit process to accommodate the new auto-accept feature
  4. Updating the ClovingGPTOptions interface to include the auto-accept option

Reason for Changes

These changes aim to streamline the commit process for users who prefer an automated workflow. The auto-accept feature allows users to bypass manual editing of commit messages, potentially saving time in scenarios where quick commits are desired.

Detailed Description

  1. CLI Command Updates: Both the main program and the generate subcommand now include a new -a, --autoAccept option. This allows users to specify auto-accept behavior directly from the command line.

  2. CommitManager Enhancements:

    • A new autoAccept property is added to the CommitManager class.
    • The commit process is now split into two paths: one for auto-accept and one for manual editing.
    • When auto-accept is enabled, the commit is made directly without opening an editor.
  3. Commit Process Refactoring: The existing commit process is preserved for cases where auto-accept is not enabled, maintaining backward compatibility.

  4. Type Definition Update: The ClovingGPTOptions interface in types.ts is updated to include the autoAccept option, ensuring type safety throughout the application.

- Bump package version to 0.3.20
- Add '-a, --autoAccept' option to commit and generate commands
- Implement auto-accept functionality in CommitManager
- Update ClovingGPTOptions interface to include autoAccept property
@cardmagic cardmagic self-assigned this Apr 10, 2025
@cardmagic cardmagic merged commit 3c31ad5 into main Apr 10, 2025
2 checks passed
@cardmagic cardmagic deleted the add-auto-accept-to-commit-message branch April 10, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant