diff --git a/.github/workflows/detect-spam.yml b/.github/workflows/detect-spam.yml new file mode 100644 index 000000000..9559e3e0e --- /dev/null +++ b/.github/workflows/detect-spam.yml @@ -0,0 +1,28 @@ +name: Spam Issue Detection +on: + issues: + types: [opened] + +permissions: + contents: none + issues: write + +jobs: + issue-spam: + runs-on: ubuntu-latest + environment: cli-automation + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Run spam detection + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ secrets.AUTOMATION_TOKEN }} + ISSUE_URL: ${{ github.event.issue.url }} + ISSUE_AUTHOR: ${{ github.event.issue.user.login }} + run: | + ./.github/workflows/scripts/spam-detection/process-issue.sh "$ISSUE_URL" + if [[ $? -ne 0 ]]; then + echo "error processing issue" + exit 1 + fi