Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
Create blatant-duplicates.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated authored Jun 29, 2024
1 parent cde06a3 commit 7e9371e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/blatant-duplicates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
issues:
types: [labeled]

jobs:
lock:
if: github.event.label.name == "blatant duplicate"
runs-on: ubuntu-latest
steps:
- run: |
url="${{ github.event.issue.html_url }}"
message="This issue has been marked as blatant duplicate, which means you have made no effort to try to check for existing issues.
For example a simple search for your issue title or the `Existing Plugin for other mod` link yields results.
As a consequence you are now banned from opening more requests."
gh issue close "$url" --reason spam -c "$message" ||
gh issue comment "$url" -b "$message"
gh issue lock "$url" -r spam || true
GH_TOKEN="$TOKEN_WITH_BLOCK_PERMISSIONS" gh api -X PUT /orgs/Vencord/blocks/"${{ github.event.issue.user.login }}"
env:
GH_TOKEN: ${{ github.token }}
TOKEN_WITH_BLOCK_PERMISSIONS: ${{ secrets.TOKEN_WITH_BLOCK_PERMISSIONS }}

0 comments on commit 7e9371e

Please sign in to comment.