gpt-commit-summarizer  by KanHarI

GitHub Action for summarizing pull requests

created 2 years ago
565 stars

Top 57.8% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a GitHub Action that leverages OpenAI's text-davinci-003 model to automatically summarize code changes within pull requests. It's designed for developers and teams seeking to improve code review efficiency and understanding by generating concise summaries of commits and file modifications, ultimately posting a comprehensive PR summary as a comment.

How It Works

The action processes pull requests by generating git diffs for each commit and modified file. These diffs are sent to the OpenAI API with a specific prompt to generate individual summaries. Subsequently, a higher-level API call synthesizes these summaries into a single, overarching summary for the entire pull request, which is then posted as a comment on the PR.

Quick Start & Requirements

  • Install: npx add-gpt-summarizer@latest (requires Node.js)
  • Prerequisites: OpenAI API key (added as a GitHub secret OPENAI_API_KEY), GITHUB_TOKEN.
  • Setup: Add .github/workflows/gpt-commit-summarizer.yml to your repository.
  • Docs: Announcement blogpost

Highlighted Details

  • Generates summaries for individual commits.
  • Creates summaries for each modified file.
  • Compiles a final PR summary from commit and file summaries.
  • Automatically deletes outdated code review comments.

Maintenance & Community

  • Issues and suggestions can be reported via GitHub issues.
  • Contact email provided for direct communication.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

Unverified reports suggest potential IP address blocking by the OpenAI API for some runners, recommending the use of self-hosted runners as a workaround. The action relies on the availability and performance of the OpenAI API.

Health Check
Last commit

1 year ago

Responsiveness

1+ week

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.