-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |