24 lines
No EOL
727 B
YAML
24 lines
No EOL
727 B
YAML
name: Check duplicates
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
check_duplicates:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
title: ${{ github.event.issue.title }}
|
|
author: ${{ github.event.issue.user.login }}
|
|
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 }}' | grep -v "${{ env.number }}")
|
|
if [ "$ISSUES" != ""]; then
|
|
gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues"
|
|
fi
|
|
env:
|
|
OPENAI_KEY: ${{ secrets.OPENAI_KEY }} |