Skip to content

feat: Add Gemini Summarize PR #39

feat: Add Gemini Summarize PR

feat: Add Gemini Summarize PR #39

name: Gemini - Summarize Pull Request
on:
pull_request:
types: [opened, edited, synchronize]
permissions:
pull-requests: write
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Dependencies
run: pip install --upgrade google-cloud-storage google-cloud-aiplatform PyGithub
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: 'Use gcloud CLI'
run: 'gcloud info'
- name: Run Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_CLOUD_PROJECT_ID: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
PROMPT_FILE: ${{ secrets.SUMMARIZE_PROMPT_FILE }}
BIGQUERY_SUMMARIZE_LOGS_TABLE: ${{ secrets.BIGQUERY_SUMMARIZE_LOGS_TABLE }}
run: python .github/actions/summarizer/gemini_summarize_pr.py