Skip to content

Releases: Pierre-Gode/AI-PR-Summarizer

Release list

AI PR Summarize

Choose a tag to compare

@PierreGode PierreGode released this 03 Jan 12:55
7e5c7bd

AI PR Summarizer

GitHub Marketplace
License

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.

Example:
image

📘 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

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Configuration
  5. Usage
  6. Managing PR Comments
  7. Troubleshooting
  8. Best Practices
  9. Support
  10. 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:

  1. GitHub Repository: Access to the repository where you want to use the Action.
  2. GitHub Personal Access Token (PAT):
  3. OpenAI 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

ko-fi

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

  1. Navigate to Your Repository:

    • Go to your repository on GitHub.
  2. Access Secrets Settings:

    • Click on "Settings" > "Secrets and variables" > "Actions".
  3. 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

  1. Navigate to Secrets Settings:

    • In your repository, go to "Settings" > "Secrets and variables" > "Actions".
  2. 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