Skip to content

chore: refactor rigging pr decorator #17

chore: refactor rigging pr decorator

chore: refactor rigging pr decorator #17

name: Update PR Description with Rigging
on:
pull_request:
types: [opened, synchronize]
jobs:
update-description:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # full history for proper diffing
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.0.3
with:
python-version: "3.10"
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install uv
- name: Generate PR Description
id: description
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
DESCRIPTION=$(uv run --no-project .github/scripts/rigging_pr_decorator.py origin/${{ github.base_ref }})
echo "description<<EOF" >> $GITHUB_OUTPUT
echo "$DESCRIPTION" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Update PR Description
uses: nefrob/pr-description@4dcc9f3ad5ec06b2a197c5f8f93db5e69d2fdca7 # v1.2.0
with:
content: |
## AI-Generated Summary
${{ steps.description.outputs.description }}
---
This summary was generated with ❤️ by [rigging](https://rigging.dreadnode.io/)
regex: ".*"
regexFlags: s
token: ${{ secrets.GITHUB_TOKEN }}