restrict-cursing-action
restrict-cursing-action copied to clipboard
Github Action to prevent cursing and bad language in issues and pull requests
Restrict Cursing Action
This Github Action is used to automatically moderate comments with bad language.
What it does? It turns offensive comments into I am so sorry
comments:
Supports:
- Issues and pull requests
- Issue and pull request comments
We use cuss
as the bad words database.
Usage
Put this into your workflow:
name: comments
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
pull_request:
types: [created, edited]
jobs:
comments:
runs-on: ubuntu-latest
steps:
- uses: sobolevn/restrict-cursing-action@latest
env:
# We need this token to edit the comment text:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You can also configure the final text:
steps:
- uses: sobolevn/restrict-cursing-action@latest
with:
# Also supports emoji:
text: "Your custom text :+1:"
env:
# We need this token to edit the comment text:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
See the actions tab for runs of this action! :rocket:
Development
Install the dependencies:
$ npm install
Build the typescript:
$ npm run build
Run the tests :heavy_check_mark::
$ npm test
See the toolkit documentation for the various packages.