mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 19:02:07 +00:00
11a82e3347
Release Notes: - N/A
33 lines
1 KiB
YAML
33 lines
1 KiB
YAML
name: Delete Mediafire Comments
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
delete_comment:
|
|
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
|
|
});
|