diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 63263690..853ff063 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -13,8 +13,10 @@ concurrency: cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} jobs: - autocomment: + auto: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout code uses: actions/checkout@v4 @@ -27,5 +29,16 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} with: debug: false - review_simple_changes: false - review_comment_lgtm: false \ No newline at end of file + review_simple_changes: true + review_comment_lgtm: true + - name: Run PR Auto on initial open PR + if: github.event_name == 'pull_request' + id: pr_auto_id + uses: vblagoje/pr-auto@v1 + with: + openai_api_key: ${{ secrets.OPENAI_API_KEY }} + user_prompt: ${{ github.event.pull_request.body }} + - name: Update PR description + uses: vblagoje/update-pr@v1 + with: + pr-body: ${{ steps.pr_auto_id.outputs.pr-text }} \ No newline at end of file