Feat/add faq to migration flow #209
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
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: | |
- name: Git Checkout | |
id: git-checkout | |
uses: actions/checkout@v2 | |
- name: Validate | |
id: validate | |
uses: fukuiretu/actions-issue-comment-validates@main | |
with: | |
debug: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Report | |
id: report | |
env: | |
HTML_URL: ${{ github.event.comment.html_url }} | |
ID: ${{ github.event.comment.id }} | |
NUMBER: ${{ github.event.issue.number }} | |
run: | | |
echo "ISSUE_NUMBER=$NUMBER" >> "$GITHUB_OUTPUT" | |
echo "Issue $NUMBER has had a comment (ID: $ID) with restricted words: ${{ steps.validate.outputs.check1 }}. Moderate at $HTML_URL if true" | |
- name: Post Warning Comment | |
id: post-warning-comment | |
if: ${{ steps.validate.outputs.check1 == 'true' }} | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
issue-number: ${{ steps.report.outputs.ISSUE_NUMBER }} | |
body: | | |
## The previous comment MAY be from a malicious actor :warning: | |
- Do not click **links** :x: | |
- Do not reveal your **recovery phrase** (ever) :x: | |
_This is an automated response aimed at protecting users from potential scams_ | |
reactions: 'eyes' |