chore: fix duplicates job
This commit is contained in:
parent
a9bd48965e
commit
c005b320d4
1 changed files with 17 additions and 14 deletions
5
.github/workflows/check_duplicates.yaml
vendored
5
.github/workflows/check_duplicates.yaml
vendored
|
|
@ -11,13 +11,15 @@ jobs:
|
|||
title: ${{ github.event.issue.title }}
|
||||
body: ${{ github.event.issue.title }}
|
||||
author: ${{ github.event.issue.author }}
|
||||
number: ${{ github.event.issue.number }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check duplicates
|
||||
run: |
|
||||
ISSUES=$(gh issue list --search '${{ env.title }}')
|
||||
ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ number }}"")
|
||||
echo $ISSUES
|
||||
if [ "$ISSUES" != ""]; then
|
||||
RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-X POST \
|
||||
|
|
@ -32,5 +34,6 @@ jobs:
|
|||
if [ "$RESPONSE" != "false" ]; then
|
||||
gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE"
|
||||
fi
|
||||
fi
|
||||
env:
|
||||
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue