Skip to content

Commit 9dd4cd2

Browse files
committed
chore: initial workflow for issue moderation
This workflow will trigger when comments are left on issues, or existing comments are edited. It has some basic keywords that can be expanded on, but the purpose of this change is to see the workflow running, with the results printed to the console. After this is proven, additional steps will be made to use the information effectively.
1 parent 551985f commit 9dd4cd2

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/issue-comments-validate.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
validates:
2+
- key: check1
3+
bodies:
4+
- "www"
5+
- ".com"
6+
- "dot com"
7+
- "http"
8+
- "https"
9+
- "support"
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Issue Comments Validate
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
- edited
7+
8+
jobs:
9+
issue_comment:
10+
name: Issue Comment
11+
if: ${{ !github.event.issue.pull_request }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- id: validate
16+
uses: fukuiretu/actions-issue-comment-validates@main
17+
with:
18+
debug: true
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
- id: report
21+
env:
22+
HTML_URL: ${{ github.event.comment.html_url }}
23+
ID: ${{ github.event.comment.id }}
24+
NUMBER: ${{ github.event.issue.number }}
25+
run: |
26+
echo "Issue $NUMBER has had a comment (ID: $ID) with restricted words: ${{ steps.step1.outputs.check1 }}. Moderate at $HTML_URL if true"

0 commit comments

Comments
 (0)