ci: Fix check duplicates workflow
This commit is contained in:
parent
417d162cdb
commit
0c8639e3fb
1 changed files with 5 additions and 2 deletions
7
.github/workflows/check_duplicates.yaml
vendored
7
.github/workflows/check_duplicates.yaml
vendored
|
|
@ -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…
Add table
Add a link
Reference in a new issue