mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-08-25 21:49:39 +00:00
fix: rename workflow and update AI description generation method
This commit is contained in:
8
.github/workflows/pr-description.yml
vendored
8
.github/workflows/pr-description.yml
vendored
@ -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 Thanks for contributing!\n\n Provide a description of your changes below and a general summary in the title.\n-->\n\n## Jira Ticket\n\n[SP-0000](https://syncrow.atlassian.net/browse/SP-0000)\n\n## Description\n\n<!--- Describe your changes in detail -->\n\n## How to Test\n\n<!--- Describe the created APIs / Logic -->"
|
||||
"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 }}
|
||||
|
Reference in New Issue
Block a user