ci: Fix duplicates workflow

pull/1889/head
Christian Kußowski 5 months ago
parent 0c8639e3fb
commit 415b7c4c5c
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -12,9 +12,8 @@ jobs:
body: ${{ github.event.issue.title }} body: ${{ github.event.issue.title }}
steps: steps:
- name: Search for similar issues - name: Search for similar issues
run: echo "ISSUES=$(gh issue list --search '${{ env.title }}' --json title,body)" >> $GITHUB_ENV run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV
- name: Send message to GPT - name: Send message to GPT
if: "${{ env.ISSUES != '[]' }}"
run: | run: |
curl -X POST \ curl -X POST \
https://api.openai.com/v1/chat/completions \ https://api.openai.com/v1/chat/completions \
@ -25,7 +24,7 @@ jobs:
"messages": [ "messages": [
{"role": "user", "content": "Please link possible duplications of this issue."}, {"role": "user", "content": "Please link possible duplications of this issue."},
{"role": "user", "content": "${{ env.title }}\n${{ env.body }}"}, {"role": "user", "content": "${{ env.title }}\n${{ env.body }}"},
{"role": "user", "content": "${{ env.ISSUES }}"} {"role": "user", "content": "${{ env.issues }}"}
], ],
"temperature": 0.7 "temperature": 0.7
}' }'

Loading…
Cancel
Save