From 43e163481640812190b46fe0d6b8d510897dfd6c Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Wed, 16 Jul 2025 21:01:34 +0100 Subject: [PATCH] ci: add spam issue detection workflow Signed-off-by: Babak K. Shandiz --- .github/workflows/detect-spam.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/detect-spam.yml 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