Skip to content

Latest commit

 

History

History
74 lines (51 loc) · 1.89 KB

File metadata and controls

74 lines (51 loc) · 1.89 KB

PR Pilot

Simplify GitHub PR creation process using automation scripts and AI tools. Utilizing Gemini Code Assist along with create_pr.sh and gemini_finder.sh scripts to automatically generate PR descriptions and translate them into Chinese (or keep them in English), improving work efficiency and reducing manual operations.

中文文件

Detailed Documentation

Detailed Documentation

Features

  • Automatically checks current branch and related commits, handles uncommitted changes (reminds users of uncommitted files)
  • Integrates with OpenAI API to generate suggested PR titles based on commits
  • Automatically determines PR type (feature, fix, docs, etc.)
  • Automatically generates or assigns labels
  • Automatically fetches English summaries generated by Gemini Code Assist
  • Automatically updates PR Description

Prerequisites

  • Install Gemini Code Assist
  • Login to GitHub CLI (gh auth login)
  • OpenAI API Key (optional, for AI title suggestions)
  • Google API Key (optional, for Gemini translation)

Installation

  1. Clone this repository

    git clone https://github.com/mukiwu/pr-pilot.git
  2. Make scripts executable

    chmod +x create_pr.sh gemini_finder.sh
  3. Set up API Keys (optional)

    echo 'export OPENAI_API_KEY="your-openai-api-key"' >> ~/.zshrc
    echo 'export GEMINI_API_KEY="your-gemini-api-key"' >> ~/.zshrc

    You can also load keys from pass:

    export OPENAI_API_KEY=$(pass openai/key)
    export GEMINI_API_KEY=$(pass gemini/key)

Usage

Create PR

./create_pr.sh

Update PR with Gemini Review Summary

./gemini_finder.sh [PR_NUMBER]

Options:

  • PR_NUMBER: The PR number to update

Contributing

Issues and improvements are welcome!

License

MIT License