Skip to content

The GitHub Pull Request Code Review Bot is a tool that utilizes the ChatGPT API to automate the process of checking pull requests in GitHub repositories. The bot reviews code changes, performs code analysis, and provides automated comments on potential errors or issues found within the pull requests.

Notifications You must be signed in to change notification settings

devmalcolm/gitpullbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

GitPullBot

An Open-Source GitHub API Integration Bot

LICENSE Documentation Status LICENSE

The GitHub Pull Request Code Review Bot is a tool that utilizes the ChatGPT API to automate the process of checking pull requests in GitHub repositories. The bot reviews code changes, performs code analysis, and provides automated comments on potential errors or issues found within the pull requests.


The main goal of this project is to enhance the efficiency and effectiveness of code review processes by automating certain aspects. The bot aims to assist developers by quickly identifying and flagging potential problems in code changes, thereby improving code quality and reducing manual review efforts.

How it might look like (Preview)

This preview has been generated with the default prompt in the script, feel free to modify at you own / needs. Logo

Prerequisites

Before you begin, make sure you have the following prerequisites in place:

Python 3.7+: This project requires Python 3.7 or later. You can download Python from the official Python website.

Operating System: This project is supported on Linux, MacOS, and Windows operating systems.

Make sure you have Python installed and accessible from the command line. You can check the installed version of Python by running:

python --version

Ensure that the command above returns a version number of 3.7 or higher.

Please note that specific steps for setting up Python might vary based on your operating system. If you encounter any issues during installation, refer to the official Python documentation for guidance.

Installation

To get started, you need to clone the project repository to your local machine:

git clone https://github.com/devmalcolm/gitpullbot.git

Before running the bot, you need to install the required Python packages. You can do this using pip and the requirements.txt file provided:

pip install -r requirements.txt

Alternatively, you can use the provided setup.py script to install the required modules one by one. Run the following command in the project directory:

python setup.py

Put your custom Github Token in order to access to your custom repo :

self.GITHUB_TOKEN = "" # Add you own Github token (settings => at the bottom "Developer Settings" then personal access token)

Once done, add your OpenAI API Key :

# Your openAI API Key
openai.api_key = ""

Then you will need to add your repo name author/repo_name

repository_name = "devmalcolm/gitpullbot" # Modify with your user/repo_name 

🚀 Running GitPullBot

Congratulations! You've successfully set up the project on your machine. You're now ready to run the GitPullBot.py script.

To start the script, navigate to the project directory in your terminal and run the following command:

python gitpullbot.py

About

The GitHub Pull Request Code Review Bot is a tool that utilizes the ChatGPT API to automate the process of checking pull requests in GitHub repositories. The bot reviews code changes, performs code analysis, and provides automated comments on potential errors or issues found within the pull requests.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages