https://github.com/sobolevn/restrict-cursing-action
Github Action to prevent cursing and bad language in issues and pull requests
https://github.com/sobolevn/restrict-cursing-action
abusive-language cursing friendly github github-action github-actions profanity-detection
Last synced: 7 months ago
JSON representation
Github Action to prevent cursing and bad language in issues and pull requests
- Host: GitHub
- URL: https://github.com/sobolevn/restrict-cursing-action
- Owner: sobolevn
- License: mit
- Created: 2019-10-07T17:31:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-12T16:48:04.000Z (over 2 years ago)
- Last Synced: 2025-11-10T02:32:28.742Z (7 months ago)
- Topics: abusive-language, cursing, friendly, github, github-action, github-actions, profanity-detection
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/restrict-cursing-action
- Size: 873 KB
- Stars: 25
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Restrict Cursing Action
[](https://wemake.services)
[](https://github.com/marketplace/actions/restrict-cursing-action)
[](https://github.com/sobolevn/restrict-cursing-action/actions)
[](https://github.com/wemake-services/wemake-frontend-styleguide)
This Github Action is used to automatically moderate comments with bad language.
What it does? It turns offensive comments into [`I am so sorry`](https://github.com/sobolevn/restrict-cursing-action/issues/3) comments:
[](https://github.com/sobolevn/restrict-cursing-action)
Supports:
- Issues and pull requests
- Issue and pull request comments
We use [`cuss`](https://github.com/words/cuss) as the bad words database.
## Usage
Put this into your [workflow](https://help.github.com/en/articles/configuring-a-workflow):
```yaml
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:
```yaml
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](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
## Development
Install the dependencies:
```bash
$ npm install
```
Build the typescript:
```bash
$ npm run build
```
Run the tests :heavy_check_mark::
```bash
$ npm test
```
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
## License
[MIT](https://github.com/sobolevn/restrict-cursing-action/blob/master/LICENSE)