ci: Remove community_delete_comments (#33396)
This was a temporary mitigation against a spam campaign, I don't think this is required any longer. We can easily revert if it's still active. See: - https://github.com/zed-industries/zed/pull/16886 Release Notes: - N/A
This commit is contained in:
parent
3740eec5bf
commit
8e831ced5b
1 changed files with 0 additions and 34 deletions
34
.github/workflows/community_delete_comments.yml
vendored
34
.github/workflows/community_delete_comments.yml
vendored
|
@ -1,34 +0,0 @@
|
||||||
name: Delete Mediafire Comments
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
delete_comment:
|
|
||||||
if: github.repository_owner == 'zed-industries'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check for specific strings in comment
|
|
||||||
id: check_comment
|
|
||||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const comment = context.payload.comment.body;
|
|
||||||
const triggerStrings = ['www.mediafire.com'];
|
|
||||||
return triggerStrings.some(triggerString => comment.includes(triggerString));
|
|
||||||
|
|
||||||
- name: Delete comment if it contains any of the specific strings
|
|
||||||
if: steps.check_comment.outputs.result == 'true'
|
|
||||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const commentId = context.payload.comment.id;
|
|
||||||
await github.rest.issues.deleteComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
comment_id: commentId
|
|
||||||
});
|
|
Loading…
Add table
Add a link
Reference in a new issue