diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index fb444e9..23ece80 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -1,4 +1,4 @@ -name: PR Summary and Code Review +name: PR summary by AI on: pull_request: @@ -14,47 +14,49 @@ permissions: jobs: pr_summary: + name: PR Summary runs-on: ubuntu-latest steps: - # Checkout repository - name: Checkout Code uses: actions/checkout@v3 - # Set up Python for PR summaries + - name: Read README.md + id: read_readme + run: | + README_CONTENT=$(cat README.md) + echo "::set-output name=README::$README_CONTENT" + - name: Set Up Python uses: actions/setup-python@v4 with: python-version: '3.9' - # Install Python dependencies - name: Install Python Dependencies run: | python -m pip install --upgrade pip pip install requests - # Run AI Analysis (PR Summary Only) - - name: Generate PR Summary + - name: PR Summary env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GITHUB_TOKEN: ${{ secrets.G_TOKEN }} + README_CONTENT: ${{ steps.read_readme.outputs.README }} run: | python - <