ci: add spam issue detection workflow

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
Babak K. Shandiz 2025-07-16 21:01:34 +01:00
parent c7c68920d8
commit 43e1634816
No known key found for this signature in database
GPG key ID: 9472CAEFF56C742E

28
.github/workflows/detect-spam.yml vendored Normal file
View file

@ -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