ci: Fix check duplicates workflow

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

@ -7,9 +7,12 @@ on:
jobs: jobs:
check_duplicates: check_duplicates:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
title: ${{ 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 '${{ github.event.issue.title }}' --json title,body | jq '[.[] | {title, body: (.body[:200])}]')" >> $GITHUB_ENV run: echo "ISSUES=$(gh issue list --search '${{ env.title }}' --json title,body)" >> $GITHUB_ENV
- name: Send message to GPT - name: Send message to GPT
if: "${{ env.ISSUES != '[]' }}" if: "${{ env.ISSUES != '[]' }}"
run: | run: |
@ -21,7 +24,7 @@ jobs:
"model": "gpt-3.5-turbo", "model": "gpt-3.5-turbo",
"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": "${{ github.event.issue.title }}\n${{ github.event.issue.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