Delete Comments Containing Sensitive Words #33
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: Delete Comments Containing Sensitive Words | |
on: | |
discussion_comment: | |
types: [created, edited] | |
permissions: | |
discussions: write | |
jobs: | |
replace_sensitive_words: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: pip install requests | |
- name: Replace Sensitive Words | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COMMENT_BODY: ${{ github.event.comment.body }} | |
COMMENT_ID: ${{ github.event.comment.node_id }} | |
run: python delete_sensitive_comments.py |