Skip to content

Expand PurchaseBuilder with all missing API fields #18

Expand PurchaseBuilder with all missing API fields

Expand PurchaseBuilder with all missing API fields #18

Workflow file for this run

name: Auto Generate PR Summary
on:
pull_request:
types: [opened, synchronize]
jobs:
generate-summary:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: pip install requests
- name: Get PR Diff
run: |
git diff origin/${{ github.base_ref }}...HEAD > pr_diff.txt
- name: Generate Summary with Ollama Cloud
id: ollama
env:
OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}
GH_TOKEN: ${{ github.token }}
run: |
gh pr view ${{ github.event.pull_request.number }} --json body -q .body > current_body.md || touch current_body.md
python scripts/generate_pr_summary.py pr_diff.txt current_body.md > summary.md
echo "SUMMARY<<EOF" >> $GITHUB_ENV
cat summary.md >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Update PR Description
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr edit ${{ github.event.pull_request.number }} --body "$SUMMARY"