diff --git a/.github/workflows/pr-description.yml b/.github/workflows/pr-description.yml index ec52e85..307e117 100644 --- a/.github/workflows/pr-description.yml +++ b/.github/workflows/pr-description.yml @@ -1,4 +1,4 @@ -name: 🤖 AI PR Description Generator (with Template) +name: 🤖 AI PR Description Commenter (Safe Mode) on: pull_request: @@ -37,7 +37,7 @@ jobs: "model": "gpt-4o", "messages": [{ "role": "user", - "content": "Given the following commit messages:\n\n'"${commits}"'\n\nFill only the \"## Description\" section in this pull request template:\n\n\n\n## Jira Ticket\n\n[SP-0000](https://syncrow.atlassian.net/browse/SP-0000)\n\n## Description\n\n\n\n## How to Test\n\n" + "content": "Given the following commit messages:\n\n'"${commits}"'\n\nGenerate a clear and professional pull request description." }] }') @@ -49,8 +49,8 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} commits: ${{ env.commits }} - - name: Update PR Body with AI Description + - name: Post AI Generated Description as Comment run: | - gh pr edit ${{ github.event.pull_request.number }} --body "${{ env.description }}" + gh pr comment ${{ github.event.pull_request.number }} --body "${{ env.description }}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}