GitHub Action for summarizing pull requests
Top 57.8% on sourcepulse
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
npx add-gpt-summarizer@latest
(requires Node.js)OPENAI_API_KEY
), GITHUB_TOKEN
..github/workflows/gpt-commit-summarizer.yml
to your repository.Highlighted Details
Maintenance & Community
Licensing & Compatibility
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.
1 year ago
1+ week