chore: Follow up find duplications workflow
This commit is contained in:
parent
2ff3a3b587
commit
ab0c06ec1f
1 changed files with 5 additions and 6 deletions
11
.github/workflows/check_duplicates.yaml
vendored
11
.github/workflows/check_duplicates.yaml
vendored
|
|
@ -13,19 +13,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Search for similar issues
|
- name: Search for similar issues
|
||||||
run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV
|
run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV
|
||||||
- name: Send message to GPT
|
- name: Let Gemini reply
|
||||||
run: |
|
run: |
|
||||||
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \
|
RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-X POST \
|
-X POST \
|
||||||
-d '{
|
-d '{
|
||||||
"contents": [{
|
"contents": [{
|
||||||
"parts":[
|
"parts":[
|
||||||
{"text": "Please write a very short and nice response to this new issue and link possible duplications."},
|
{"text": "Please write a very short and nice response to this new issue and link possible duplications.\n\n${{ env.title }}\n${{ env.body }}\n\nPossible Duplications:\n${{ env.issues }}"}
|
||||||
{"text": "${{ env.title }}\n${{ env.body }}"},
|
|
||||||
{"text": "${{ env.issues }}"}
|
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
}'
|
}' | jq -r '.candidates[0].content.parts[0].text')
|
||||||
|
gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE"
|
||||||
env:
|
env:
|
||||||
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue