generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

feat: Add Gemini Summarize PR

Open holtskinner opened this issue 1 year ago • 1 comments

holtskinner avatar Jun 11 '24 16:06 holtskinner

Pull Request Summary from Gemini ✨

: feat: Add Gemini Summarize PR

This pull request introduces a new feature: summarizing pull requests using the Gemini model.

Changes:

  • .github/actions/spelling/excludes.txt: Added an exclusion for the new summarizer script.
  • .github/actions/summarizer/example_prompt.json: Added an example prompt for the Gemini model.
  • .github/actions/summarizer/gemini_summarize_pr.py: Added a new Python script that uses the Gemini model to summarize pull requests and adds the summary as a comment.
  • .github/workflows/gemini_summarizer.yml: Added a new workflow that triggers the summarizer script on pull request events (opened, edited, synchronized).

Functionality:

The new workflow will automatically trigger the gemini_summarize_pr.py script whenever a pull request is opened, edited, or synchronized. The script will:

  1. Fetch the pull request content (title, description, files changed, code diff).
  2. Use the Gemini model to generate a summary of the pull request.
  3. Add the summary as a comment to the pull request.

Benefits:

  • Provides a concise summary of pull requests, making it easier for reviewers to understand the changes.
  • Automates the process of summarizing pull requests, saving time and effort.

Configuration:

The workflow requires the following environment variables to be set:

  • GITHUB_TOKEN: GitHub access token.
  • GOOGLE_CLOUD_PROJECT_ID: Google Cloud Project ID.
  • SUMMARIZE_PROMPT_FILE: URI of the prompt file for the Gemini model.
  • BIGQUERY_SUMMARIZE_LOGS_TABLE: BigQuery table to log prompt input/output.

Overall, this pull request adds a valuable feature that improves the efficiency and clarity of pull request reviews.


Generated at 620166e733493244c5044910fca1e503755e12cc

github-actions[bot] avatar Jun 11 '24 17:06 github-actions[bot]

Not needed with Gemini Review GitHub Action

holtskinner avatar Dec 18 '24 16:12 holtskinner

This pull request adds a new GitHub Actions workflow that summarizes pull requests using the Gemini model. However, as noted by @holtskinner, this functionality is likely redundant given the existence of a Gemini Review GitHub Action. Consider whether this new action offers significant advantages over existing solutions, such as improved summarization quality or unique features. If not, merging this PR might be unnecessary. If there are unique advantages, please clearly articulate them in the pull request description to justify its inclusion.

ghost avatar Dec 18 '24 16:12 ghost