Skip to content
alert-triangle

GitHub Action

restrict-cursing-action

0.1.0 Latest version

restrict-cursing-action

alert-triangle

restrict-cursing-action

Github Action to prevent cursing and bad language in issues and pull requests

Installation

Copy and paste the following snippet into your .yml file.

              

- name: restrict-cursing-action

uses: sobolevn/restrict-cursing-action@0.1.0

Learn more about this action in sobolevn/restrict-cursing-action

Choose a version

Restrict Cursing Action

wemake.services Github Marketplace Github Action wemake-python-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 comments:

Demo

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! 🚀

Development

Install the dependencies:

$ npm install

Build the typescript:

$ npm run build

Run the tests ✔️:

$ npm test

See the toolkit documentation for the various packages.

License

MIT