Repository navigation
Releases: Pierre-Gode/AI-PR-Summarizer
Release list
AI PR Summarize
AI PR Summarizer
Automate your pull request reviews with intelligent, AI-generated summaries. The AI PR Summarizer leverages advanced natural language processing to analyze and summarize changes in your pull requests, saving you time and enhancing code review efficiency.
🚀 Features
- Automated Summaries: Automatically generate concise summaries of pull request changes.
- Key Highlights: Highlight important files and explain the purpose of each change.
- Seamless Integration: Easily integrate with your existing GitHub workflows.
- Secure and Private: Maintain code privacy while leveraging powerful AI capabilities.
📘 AI PR Summarizer: Customer Guide
Welcome to the AI PR Summarizer! This guide will help you seamlessly integrate our AI-powered tool into your GitHub workflows, enabling automated, intelligent summaries of your pull requests. Follow the steps below to get started, configure settings, and troubleshoot common issues.
📖 Table of Contents
- Introduction
- Prerequisites
- Installation
- Configuration
- Usage
- Managing PR Comments
- Troubleshooting
- Best Practices
- Support
- FAQs
🎉 Introduction
The AI PR Summarizer is a GitHub Action designed to streamline your pull request (PR) review process by automatically generating concise, AI-driven summaries. It analyzes the changes in your PRs and posts detailed comments, highlighting key modifications, potential impacts, and suggestions for improvement.
Benefits:
- Time-Saving: Reduces the manual effort required to review extensive PRs.
- Consistency: Ensures standardized summaries across all PRs.
- Enhanced Collaboration: Provides clear overviews, facilitating better team communication.
📋 Prerequisites
Before integrating the AI PR Summarizer into your GitHub repository, ensure you have the following:
- GitHub Repository: Access to the repository where you want to use the Action.
- GitHub Personal Access Token (PAT):
- Scopes Required:
read:packageswrite:packagesrepo
- How to Generate:
- Navigate to GitHub Settings > Developer settings > Personal access tokens.
- Click on "Generate new token".
- Select the required scopes.
- Generate and securely store your PAT.
- Scopes Required:
- OpenAI API Key:
- How to Obtain:
- Sign up or log in to your OpenAI account.
- Generate a new API key.
- How to Obtain:
🛠 Installation
1. Authenticate to GitHub Container Registry (GHCR)
To allow the Action to pull the private Docker image from GHCR, you need to authenticate using your GitHub PAT.
and be member of https://github.com/Pierre-Gode
Request to be added to the organization https://github.com/Pierre-Gode for a fee of 5$/month to
and by sending email to Pierre@gode.one with your or the serviceusers Github username. (pat owner)
a. Generate a GitHub PAT
If you haven't already generated a PAT, follow the Prerequisites section.
b. Add the PAT as a Secret in Your Repository
-
Navigate to Your Repository:
- Go to your repository on GitHub.
-
Access Secrets Settings:
- Click on "Settings" > "Secrets and variables" > "Actions".
-
Add New Secret:
- Click on "New repository secret".
- Name:
GHCR_PAT - Value: Paste your generated PAT.
- Click "Add secret".
2. Add OpenAI API Key as a Secret
-
Navigate to Secrets Settings:
- In your repository, go to "Settings" > "Secrets and variables" > "Actions".
-
Add New Secret:
- Click on "New repository secret".
- Name:
OPENAI_API_KEY - Value: Paste your OpenAI API key.
- Click "Add secret".
⚙️ Configuration
Configure the AI PR Summarizer by setting up your GitHub Actions workflow. This involves creating or updating a workflow YAML file in your repository.
1. Create or Update Your Workflow
Add a new workflow file (e.g., .github/workflows/ai-pr-summarizer.yml) or update an existing one with the following content:
name: 'AI PR Summarizer'
on:
pull_request:
types: [opened, synchronize, reopened, edited, closed]
jobs:
summarize_pr:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
packages: read
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Pull AI PR Summarizer Docker Image
run: |
docker pull ghcr.io/your-org/ai-pr-summarizer:latest || \
(echo "Retrying Docker pull..." && sleep 10 && docker pull ghcr.io/your-org/ai-pr-summarizer:latest)
- name: Run AI PR Summarizer
run: |
docker run --rm \
-v $GITHUB_EVENT_PATH:/app/event.json \
-e GITHUB_EVENT_PATH="/app/event.json" \
-e GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
-e OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" \
ghcr.io/your-org/ai-pr-summarizer:latest