定制 salehhashemi/laravel-intelli-git 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

salehhashemi/laravel-intelli-git

最新稳定版本:v0.1.0

Composer 安装命令:

composer require salehhashemi/laravel-intelli-git

包简介

An intelligent Git helper package for Laravel applications. It utilizes OpenAI's GPT to analyze your Git repository, providing features such as automatic generation of commit messages based on staged changes.

README 文档

README

Latest Version on Packagist Total Downloads GitHub Actions StyleCI

An intelligent Laravel package to generate git commit messages using OpenAI.

Header Image

Features

The following commands are implemented in this package:

  • ai:commit - Generate a commit message and description using AI

Stay tuned for future updates as we continue to expand the capabilities of the Laravel Intelli Git package.

Installation

  1. Install the package via composer:

    composer require salehhashemi/laravel-intelli-git
    
  2. Publish the configuration file:

    php artisan vendor:publish --provider="Salehhashemi\LaravelIntelliGit\LaravelIntelliGitServiceProvider"
    
  3. Add your OpenAI API key to the .env file:

    OPEN_AI_KEY=your_openai_key
    
  4. Optionally, you can change the default model used by OpenAI in the .env file:

    OPEN_AI_MODEL=gpt-4
    

Usage

ai:commit

php artisan ai:commit

This command will automatically check for staged and unstaged changes in your git repository. If unstaged changes are found, it will ask you to stage them. Then, it will generate a commit message and description using OpenAI.

Examples

ai:commit

Here's an example of the command in action:

$ php artisan ai:commit
No staged changes found.
There are unstaged changes. Would you like to stage all changes? (yes/no) [no]:
> yes
All changes have been staged.
Generating commit message with AI, please wait...

Here are the AI-generated commit title and description:
Title
Refactor User model and improve validation
Description
This commit refactors the User model, specifically improving the validation logic by adding custom validation rules. It also includes updates to the relevant tests.

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 832
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-14