@ -16,9 +16,9 @@ jobs:
- uses : actions/checkout@v4
- uses : actions/checkout@v4
- name : Check duplicates
- name : Check duplicates
run : |
run : |
issues=$(gh issue list --search '${{ env.title }}' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"' )
issues=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}" )
if [ "$ISSUES" != ""]; then
if [ "$ISSUES" != ""]; then
gh issue comment ${{ github.event.issue.number }} --body " Thanks for reporting @${{ env.author }}.\nPlease check if this could be a duplicate of one of these issues :\n$issues"
gh issue comment ${{ github.event.issue.number }} --body " @${{ env.author }}\nPossible duplication of :\n$issues"
fi
fi
env:
env:
OPENAI_KEY : ${{ secrets.OPENAI_KEY }}
OPENAI_KEY : ${{ secrets.OPENAI_KEY }}