Get started

Up and running in two minutes.

Potty Mouth is a single GitHub Action step. Drop it into a workflow that runs on issue and pull request events, and it does the rest.

1

Create the workflow file

Add a new file at .github/workflows/profanity-filter.yml in your repository.

2

Paste this in

A complete, copy-pastable starting workflow. Adjust the replacement-strategy to taste.

.github/workflows/profanity-filter.yml yaml
# .github/workflows/profanity-filter.yml
name: Profanity filter

# Trigger on issue or pull request events
on:
  issue_comment:
    types: [created, edited]
  issues:
    types: [opened, edited, reopened]
  pull_request:
    types: [opened, edited, reopened]

# Required permissions
permissions:
  issues: write
  pull-requests: write

jobs:
  apply-filter:
    runs-on: ubuntu-latest
    steps:
      - name: Scan for profanity
        # Skip bot-authored events
        if: github.actor != 'dependabot[bot]'
        uses: IEvangelist/profanity-filter@main
        id: profanity-filter
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          replacement-strategy: emoji
3

Commit and push

On the next issue, comment, or pull request that opens or edits, the action runs and a job summary will be attached to the run.

- name: Scan for profanity
  if: github.actor != 'dependabot[bot]'
  uses: IEvangelist/profanity-filter@main
  id: profanity-filter
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    replacement-strategy: first-letter-then-asterisk