Skip to content

Conversation

@tobias-kuendig
Copy link
Contributor

Description

This MR adds an LLM interface to cleanup the code structure and make it easier to add other providers in the future.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Other (please describe):

For Hacktoberfest Participants

  • This PR is submitted as part of Hacktoberfest 2025

Thank you for your contribution! 🎉

DFanso and others added 30 commits March 2, 2025 13:49
Improve setup process, switch to X.AI API, and enhance error handling and configuration management.
Improve setup and usage examples in README.md and update grok.go to reflect new path requirements for better project consistency.
This commit introduces functionality to automatically set up the current directory as a repository when "." is provided as an argument. It also includes auto-configuration for new repositories not found in the config, ensuring unique names and saving the new configuration.
- Correct typo in guideline 6
- Add new guideline 7 for using '-' in sentences
Simplified API key management by removing it from the Config struct and passing it directly to GenerateCommitMessage. Updated README to include instructions for setting the GROK_API_KEY environment variable.
This commit adds new command examples to the README.md file, demonstrating how to run the main.go script in the current directory. The new examples enhance the documentation by showing an alternative usage of the tool.
Add new command example to README and update commit message guidelines in grok.go to include more action verbs and a sample message.
…ity and performance

Improve CI/CD workflow by updating actions/checkout to v4, actions/setup-go to v5, actions/upload-artifact to v4, and actions/download-artifact to v4. Also, remove unnecessary log message in main.go.
Add auto-tagging job, refine build and release processes, and improve error handling for artifact creation and packaging.
Improvements include:
- Streamline auto-tag job output
- Ensure build job runs even if auto-tag is skipped
- Simplify release and publish job conditions
- Update file paths for consistency
- Enhance debug logging with 'find' command
This commit updates the Go version used in the CI/CD pipeline from 1.22 to 1.23, which should bring performance improvements and new features. Additionally, the workflow has been streamlined by reorganizing the job structure, renaming jobs for clarity, and optimizing the artifact handling and packaging process. The release job now depends on the new 'package' job, ensuring that binaries are properly packaged before release creation.
…sections

Improve clarity and provide comprehensive guidance for users.
- Adds Gemini as an alternative LLM for generating commit
- messages, configurable via the COMMIT_LLM environment
- variable. Also updates dependencies and README.
- Moves the commit message prompt to a `types.CommitPrompt` variable
- for better organization and maintainability.
- Removes unused imports and simplifies main function
- Updates Grok API endpoint to a hardcoded URL
- The config.go file, which previously handled loading and saving
- configuration, has been removed. This change is part of a larger
- refactoring effort to simplify and update the configuration system.
- Modifies README to instruct users to use their own git repo path
- Simplifies the example command to use current directory
- Modifies the README to use a simpler command for setting up
- `commit-msg`, allowing dynamic path usage for easier setup.
- Updates the AI model in GenerateCommitMessage to
- use the newer, potentially faster beta version
- for improved commit message generation.
@DFanso DFanso self-assigned this Oct 3, 2025
@DFanso DFanso self-requested a review October 3, 2025 04:23
Copy link
Owner

@DFanso DFanso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, after @abdulessa added the OpenAPI provider, your architecture changes seem to be broken. Could you take a look and fix that?

@DFanso
Copy link
Owner

DFanso commented Oct 3, 2025

if u get any errors with my new refactor try do these steps

rm -rf commit-msg

Make a fresh clone

git clone https://github.com/DFanso/commit-msg.git

@DFanso DFanso closed this Oct 3, 2025
@DFanso DFanso reopened this Oct 3, 2025
@gitguardian
Copy link

gitguardian bot commented Oct 3, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - X AI API Key 1d66fd1 commit-helper.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@DFanso
Copy link
Owner

DFanso commented Oct 3, 2025

Hey @tobias-kuendig i think you have to re clone and re do the changes again sorry for the trouble ☹️

@DFanso DFanso closed this Oct 3, 2025
@DFanso
Copy link
Owner

DFanso commented Oct 3, 2025

@tobias-kuendig i create a new feature request as well , #9

@DFanso DFanso added the hacktoberfest Eligible for Hacktoberfest label Oct 3, 2025
DFanso pushed a commit that referenced this pull request Oct 7, 2025
fix #69 : remove emojis from console output for professional appearance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest Eligible for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants