{"id":15659302,"url":"https://github.com/ievangelist/profanity-filter","last_synced_at":"2026-05-07T22:02:11.354Z","repository":{"id":194419750,"uuid":"690783480","full_name":"IEvangelist/profanity-filter","owner":"IEvangelist","description":"Potty Mouth: A GitHub Action profanity filter written in .NET, leveraging Native AOT compilation.","archived":false,"fork":false,"pushed_at":"2025-04-09T22:35:14.000Z","size":5393,"stargazers_count":27,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T01:54:22.297Z","etag":null,"topics":["dotnet","github-actions","native-aot","profanity-check","profanity-detection","profanity-filter","profanityfilter"],"latest_commit_sha":null,"homepage":"https://devblogs.microsoft.com/dotnet/developing-optimized-github-actions-with-net-and-native-aot","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IEvangelist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"IEvangelist","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-09-12T21:47:39.000Z","updated_at":"2025-03-29T15:06:26.000Z","dependencies_parsed_at":"2023-11-25T17:23:41.908Z","dependency_job_id":"7315b1b8-7d9d-43c2-b599-0dbdccb114d7","html_url":"https://github.com/IEvangelist/profanity-filter","commit_stats":{"total_commits":233,"total_committers":6,"mean_commits":"38.833333333333336","dds":"0.46351931330472107","last_synced_commit":"ca100b999cc6884742f2cba58f0e8c342290e033"},"previous_names":["ievangelist/profanity-filter"],"tags_count":98,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEvangelist%2Fprofanity-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEvangelist%2Fprofanity-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEvangelist%2Fprofanity-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IEvangelist%2Fprofanity-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IEvangelist","download_url":"https://codeload.github.com/IEvangelist/profanity-filter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249701665,"owners_count":21312757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","github-actions","native-aot","profanity-check","profanity-detection","profanity-filter","profanityfilter"],"created_at":"2024-10-03T13:16:08.718Z","updated_at":"2026-05-07T22:02:11.343Z","avatar_url":"https://github.com/IEvangelist.png","language":"C#","funding_links":["https://github.com/sponsors/IEvangelist"],"categories":[],"sub_categories":[],"readme":"![profanity-filter](https://socialify.git.ci/IEvangelist/profanity-filter/image?description=1\u0026descriptionEditable=%F0%9F%A4%AC%20Potty%20Mouth%3A%20A%20GitHub%20Action%20profanity%20filter%20written%20in%20.NET%2C%20leveraging%20Native%20AOT%20compilation.\u0026font=Raleway\u0026language=1\u0026name=1\u0026owner=1\u0026pattern=Signal\u0026theme=Auto)\n \n# Potty Mouth: GitHub Action\n\n\u003e This repository contains the source code for a profane content filter 🤬.\n\n[![.NET](https://github.com/IEvangelist/profanity-filter/actions/workflows/dotnet.yml/badge.svg)](https://github.com/IEvangelist/profanity-filter/actions/workflows/dotnet.yml) [![Dogfood](https://github.com/IEvangelist/profanity-filter/actions/workflows/dogfood.yml/badge.svg)](https://github.com/IEvangelist/profanity-filter/actions/workflows/dogfood.yml)\n\nThe GitHub Action: Profane content filter maintains over 4,900 swear words from nine different languages. For a list of all supported languages and swear words, [see the data directory](https://github.com/IEvangelist/profanity-filter/tree/main/src/ProfanityFilter.Services/Data) raw newline-delimited text files with each corresponding language's alphabetically sorted swear word list. This tool is used to scan issues, pull requests and comments in either for profanity. It can be configured to replace any profane content with a [strategy](#-replacement-strategies) and renders a complete job summary for tracking profanity filter results. This action can be useful for maintaining a professional and respectful environment in your GitHub repository.\n\n## ⁉️ Why\n\nBut why is this important? Let's be honest, not everyone who creates issues or pull requests use appropriate language (it's not always rainbows and ponies, am I right?)\n\n\u003e [!NOTE]\n\u003e With this action in your repositories GitHub workflow, it can be 🌈 and 🐎.\n\n## 🤓 Usage\n\nThe following is an example of how to use the action as a standalone workflow:\n\n```yml\n# The name of the workflow\nname: Profanity filter\n\n# Trigger on issue or pull requests, that are opened, edited, or reopened\non:\n  issue_comment:\n    types: [created, edited]\n  issues:\n    types: [opened, edited, reopened]\n  pull_request:\n    types: [opened, edited, reopened]\n\n# Required permissions\npermissions:\n  issues: write\n  pull-requests: write\n\njobs:\n  # Name the job whatever you'd like\n  apply-filter:\n\n    runs-on: ubuntu-latest\n\n    steps:\n\n    # Name the step anything that makes sense to you\n    - name: Scan issue or pull request for profanity\n      # Conditionally run the step if the actor isn't a bot\n      if: ${{ github.actor != 'dependabot[bot]' \u0026\u0026 github.actor != 'github-actions[bot]' }}\n      uses: IEvangelist/profanity-filter@main\n      id: profanity-filter\n      with:\n        token: ${{ secrets.GITHUB_TOKEN }}\n        # See https://bit.ly/potty-mouth-replacement-strategies\n        replacement-strategy: Emoji # See Replacement strategy\n```\n\nIf you already have an existing workflow that is triggered `on/issues|pull_request/types/opened|edited|reopened` feel free to simply add a step to the existing job:\n\n```yml\n- name: Scan issue or pull request for profanity\n  # Conditionally run the step if the actor isn't a bot\n  if: ${{ github.actor != 'dependabot[bot]' \u0026\u0026 github.actor != 'github-actions[bot]' }}\n  # Use the profanity filter action\n  uses: IEvangelist/profanity-filter@main\n  id: profanity-filter\n  with:\n    token: ${{ secrets.GITHUB_TOKEN }}\n    # See https://bit.ly/potty-mouth-replacement-strategies\n    replacement-strategy: FirstLetterThenAsterisk\n```\n\n\u003e [!IMPORTANT]\n\u003e You'll still need to ensure that the existing GitHub workflow has the appropriate `permissions`, with `issues: write` and `pull-requests: write` such that the profanity filter's `${{ secrets.GITHUB_TOKEN }}` will be capable of applying filters.\n\n## 👀 Inputs\n\nThis action has several inputs. Only the `token` is required, and the `replacement-strategy` defaults to `asterisk` when not specified.\n\nThe following table describes each input:\n\n| Input | Description | Required |\n|--|--|--|\n| `token` | The GitHub token used to update the issues or pull requests with.\u003cbr\u003e\u003cbr\u003eExample, `${{ secrets.GITHUB_TOKEN }}`. | `true` |\n| `replacement-strategy` | The type of replacement method to use when profane content is filtered. | `false` (default: `asterisk`) |\n| `include-updated-note` | A `boolean` value to indicate if the action should include a note in the issue or pull request body when profane content is replaced. | `false` (default: `true`) |\n| `include-confused-reaction` | A `boolean` value to indicate if the action should react to the issue or pull request with the confused 😕 reaction. | `false` (default: `false`) |\n| `manual-profane-words` | A `string` value, with a comma-separated list of additional profane words to include in the filter. | `false` |\n| `custom-profane-words-url` | A URL that returns a `string` value, with a newline-separated list of custom profane words to include in the filter. | `false` |\n\n### 😵 Replacement strategies\n\nEach replacement strategy corresponds to a different way of replacing profane content. The following represents the available replacement types:\n\n| Strategy input | Four letter profane word example | Description |\n| --- | --- | --- |\n| `asterisk` | `****` | Replaces profane content with asterisks. |\n| `emoji` | `💩` | Replaces profane content with a random emoji. |\n| `grawlix` | `#%$!` | Replaces profane content with grawlix symbols. |\n| `bold-grawlix` | __`#%$!`__ | Replaces profane content with bold grawlix symbols. |\n| `bleep` | `bleep` | Replaces profane content with the word \"bleep\". |\n| `redacted-rectangle` | `████` | Replaces profane content with rectangles to redact their content. |\n| `anger-emoji` | `😡` | Replaces profane content with a random anger emoji. |\n| `middle-asterisk` | `f**k` | Replaces profane content with asterisk, but only in the middle of the word. |\n| `middle-swear-emoji` | `f🤬k` | Replaces profane content with a random swear emoji, but only in the middle of the word. |\n| `random-asterisk` | `*` - `****` | Replaces profane content with a random number of asterisks. |\n| `first-letter-then-asterisk` | `f***` | Replaces profane content with asterisks after the first letter. |\n| `vowel-asterisk` | `sh*t` | Replaces profane content with asterisks, but only the vowels. |\n| `strike-through` | \u003cdel\u003eshit\u003c/del\u003e | Encloses profane content with `\u003cdel\u003e` HTML tags causing strikethrough rendering. |\n| `underscores` | `____` | Replaces profane content with underscores `_`. |\n\nThe value of the `replacement-strategy` input is case-insensitive, and accepts hyphened alternatives (such as `anger-emoji`) as well.\n\n\u003e [!TIP]\n\u003e All asterisk replacement strategies are escaped with a backslash `\\` to prevent markdown from rendering the asterisks as bold text. No need for you the escape these values yourself. This excludes title updates, as markdown is supported there.\n\n## 🏷️ Label requirements\n\nThis action will look for a label with the following verbatim name `\"profane content 🤬\"`, if found this label is applied to any issue or pull request where profane content filtration occurs.\n\nConsider the following automatically applied label to an issue that contains profane content:\n\n![A screenshot of a user experience where the GitHub Actions `bot` added the profane content label 6 hours ago.](assets/label-applied-lght.png#gh-light-mode-only)\n![A screenshot of a user experience where the GitHub Actions `bot` added the profane content label 6 hours ago.](assets/label-applied-dark.png#gh-dark-mode-only)\n\n## 🎬 What happens?\n\nWhen profane content is detected, the action will update the issue or pull request by:\n\n- Replacing any found profane content with the configured replacement strategy.\n- Reacting to the issue or pull request with the [confused 😕 reaction](https://docs.github.com/rest/reactions/reactions).\n- Conditionally applying the `profane content 🤬` label if found in the repository.\n- Reporting the profane content in the workflow summary as a detailed table.\n\nConsider the following diagram, that represents the workflow of this GitHub action:\n\n```mermaid\nflowchart TD\n    A(Issue or Pull Request)\n      --\u003e B[Contains Profane Content?]\n    B --\u003e|YES| C(Apply Filter)\n      --\u003e E(All swear words are filtered, for example sw**r)\n      --\u003e F(React to and label profane content)\n      --o G[Job Summary]\n    B --o|NO| D{{Stop}} ~~~A\n```\n\n### ⚠️ Example job summary\n\nThe following is an example of a job summary that is rendered when profane content is detected:\n\n![A screenshot of an example job summary, showing the application process of the profanity filter.](assets/job-summary-lght.png#gh-light-mode-only)\n![A screenshot of an example job summary, showing the application process of the profanity filter.](assets/job-summary-dark.png#gh-dark-mode-only)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fievangelist%2Fprofanity-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fievangelist%2Fprofanity-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fievangelist%2Fprofanity-filter/lists"}