Skip to content

Commit

Permalink
chore: initial workflow for issue moderation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rhyslbw committed Dec 19, 2023
1 parent 551985f commit 4b947a6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/issue-comments-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
validates:
- key: check1
bodies:
- "www"
- ".com"
- "dot com"
- "http"
- "https"
- "support"
26 changes: 26 additions & 0 deletions .github/workflows/comments-moderation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Issue Comments Validate
on:
issue_comment:
types:
- created
- edited

jobs:
issue_comment:
name: Issue Comment
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: validate
uses: fukuiretu/actions-issue-comment-validates@main
with:
debug: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: report
env:
HTML_URL: ${{ github.event.comment.html_url }}
ID: ${{ github.event.comment.id }}
NUMBER: ${{ github.event.issue.number }}
run: |
echo "Issue $NUMBER has had a comment (ID: $ID) with restricted words: ${{ steps.validate.outputs.check1 }}. Moderate at $HTML_URL if true"

0 comments on commit 4b947a6

Please sign in to comment.