ci: add spam issue detection workflow
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
c7c68920d8
commit
43e1634816
1 changed files with 28 additions and 0 deletions
28
.github/workflows/detect-spam.yml
vendored
Normal file
28
.github/workflows/detect-spam.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue