Code Monkey home page Code Monkey logo

pycommit's Introduction

PyCommit

This project automates the process of generating commit messages based on the changes made in your Git repository. It utilizes the OpenAI API to generate meaningful commit messages in English.

Installation

  1. Clone this repository to your local machine: git clone <repository-url>
  2. Install the required dependencies: pip install -r requirements.txt
  3. Set up your OpenAI API key:
    • Sign up for an account on the OpenAI website.
    • Generate an API key.
    • Set the API key as an environment variable or directly in the script.

Usage

To use this tool, follow these steps:

  1. Navigate to the root directory of your Git repository.
  2. Run the script commit.py with the path to your repository as an argument:

python commit.py /path/to/your/git/repo

  1. If you have a .pycommit.yml file in your repository with custom parameters, the script will utilize those parameters. Otherwise, it will use default parameters.
  2. The script will generate a commit message based on the changes in your repository and copy it to your clipboard.

Configuration

You can customize the behavior of the commit message generation by modifying the .pycommit.yml file in your repository. Here is an example of how to structure the file:

log_size: 3
context:
  - "Custom parameter 1"
  - "Custom parameter 2"
  - "Custom parameter 3"

Each parameter specified in the context section will be included in the context for generating the commit message.

Contributing

Contributions are welcome! If you have any ideas, suggestions, or improvements, feel free to open an issue or create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

pycommit's People

Contributors

digoreis avatar

Stargazers

Stéphane Couvreur avatar Luciano Bohrer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.