Skip to content

Generate the title and body of the Pull Request with ChatGPT API based on git diff. Create a new Pull Request or update an existing Pull Request based on this title and body.

Notifications You must be signed in to change notification settings

tomoyaf/gh-prai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRAI - Automate Your Pull Request Titles and Descriptions

release

GitHub CLI Extension

PRAI (Pull Request AI) is a GitHub CLI extension that automates the creation of pull request titles and descriptions by leveraging the power of OpenAI's ChatGPT API. Whether you're a solo developer or part of a team, PRAI helps you save time by generating thoughtful, concise, and well-structured PR summaries based on your git diffs.

Key Features

  • Automatic PR Title and Description Generation: PRAI generates pull request titles and bodies based on your git diff, removing the need for manual writing.
  • Integration with GitHub CLI: Easily create new pull requests or update existing ones with a few simple commands.
  • Flexible Configuration: Customize the PR templates, language, and prompts to fit your workflow.

DEMO

Default Usage

prai_new_example.mov

Configure Language to English

prai_new_en_example.mov

Why Use PRAI?

  • Time-saving: Focus on coding while PRAI writes your PR descriptions.
  • Consistency: Maintain a uniform style and tone in your PRs across your projects.
  • AI-Powered: PRAI uses ChatGPT to analyze your code changes and summarize them effectively.

Installation

Install the extension using GitHub CLI:

gh extension install tomoyaf/gh-prai

Usage

Step 1: Set up Your OpenAI API Key

Before you can start using PRAI, configure your OpenAI API key:

gh prai config api_key YOUR_OPENAI_API_KEY

Step 2: Generate a Pull Request

To automatically generate the title and body of your pull request, simply run:

gh prai # or 'gh prai create'

Additional Configurations

Language: Set the language for the PR title and description (default: English).

gh prai config language en  # or 'ja'

Template: Customize the template used for PR descriptions.

gh prai config template default  # or './.github/PULL_REQUEST_TEMPLATE/mytemplate.md'

Custom Prompts: Tailor the AI's behavior by providing a custom prompt.

gh prai config prompt "Your custom prompt"

Help and Documentation

For more details on available commands and options:

gh prai --help

Contributing

We welcome contributions! Please feel free to submit issues or pull requests to help improve PRAI.

License

This project is licensed under the MIT License.

About

Generate the title and body of the Pull Request with ChatGPT API based on git diff. Create a new Pull Request or update an existing Pull Request based on this title and body.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages