{"id":15462547,"url":"https://github.com/thomasbnt/notoxicdiscussions","last_synced_at":"2026-04-16T08:36:09.345Z","repository":{"id":45345791,"uuid":"435967069","full_name":"thomasbnt/NoToxicDiscussions","owner":"thomasbnt","description":"No Toxic Discussions, a GitHub Action to detect toxicity in discussions area.","archived":false,"fork":false,"pushed_at":"2022-07-01T16:15:30.000Z","size":8798,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-18T20:44:56.656Z","etag":null,"topics":["actions","discussion","github","hackathon"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasbnt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"thomasbnt","custom":"https://www.buymeacoff.ee/thomasbnt/?via=thomasbnt"}},"created_at":"2021-12-07T17:17:50.000Z","updated_at":"2024-06-22T11:38:01.000Z","dependencies_parsed_at":"2023-01-04T12:27:08.133Z","dependency_job_id":null,"html_url":"https://github.com/thomasbnt/NoToxicDiscussions","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.30000000000000004","last_synced_commit":"f4b9d6c708a8269a99440a3f2f6835cadb6143f0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbnt%2FNoToxicDiscussions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbnt%2FNoToxicDiscussions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbnt%2FNoToxicDiscussions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbnt%2FNoToxicDiscussions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasbnt","download_url":"https://codeload.github.com/thomasbnt/NoToxicDiscussions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246014750,"owners_count":20709870,"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":["actions","discussion","github","hackathon"],"created_at":"2024-10-02T00:02:09.664Z","updated_at":"2026-04-16T08:36:09.313Z","avatar_url":"https://github.com/thomasbnt.png","language":"JavaScript","funding_links":["https://github.com/sponsors/thomasbnt","https://www.buymeacoff.ee/thomasbnt/?via=thomasbnt","https://www.buymeacoffee.com/thomasbnt/?via=thomasbnt"],"categories":[],"sub_categories":[],"readme":"### 😶 Disclaimer : Read this before using it\n\nFor the moment, this **GitHub Action** doesn't work as properly as I would like. When GitHub adds the possibility to add *and/or* edit comments in Discussions, I will update the project.\n\nI started this Action because I thought that it is a good idea to have a moderation tool in the Discussions part with the toxicity of comments.\nSo I did it thinking it would be feasible, but when I got to the end of the code part, I couldn't figure out how to create/edit comments.\n\n___\n# No Toxic Discussions\n\n\u003e A GitHub action that detects toxic messages in Discussions.\n\n**No Toxic Discussions** uses the **Perspective API** by *Jigsaw* from Google.\n\n[![](https://img.shields.io/badge/-Github_Actions-2088FF?style=for-the-badge\u0026logo=github-actions\u0026logoColor=white)](https://github.com/marketplace/actions/no-toxic-discussions)\n[![Follow me on Twitter](https://img.shields.io/twitter/follow/Thomasbnt_?color=%231DA1F2\u0026label=Follow%20me\u0026logo=Twitter\u0026style=for-the-badge)](https://twitter.com/Thomasbnt_)\n[![Follow me on DEV](https://img.shields.io/badge/dev.to-%2308090A.svg?\u0026label=Read%20me%20on\u0026style=for-the-badge\u0026logo=dev.to\u0026logoColor=white\u0026alt=devto)](https://dev.to/thomasbnt)\n\n## Workflow \nCreate the `.github/workflows/NoToxicDiscussions.yml` file with the following configuration :\n\n```yml\nname: No Toxic Discussions Here\non:\n  discussion:\n    # created type can be marked as an error BUT IT WORKS. See the docs :\n    # https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#discussion\n    types: [ created, opened, edited, answered ]\n  discussion_comment:\n    types: [ created, edited ]\njobs:\n  CheckIfToxicContent:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v2\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          PERSPECTIVE_API_KEY: ${{ secrets.PERSPECTIVE_API_KEY }}\n      - name: Install dependencies\n        run: |\n          yarn install\n          yarn add @actions/core @actions/github\n      - name: Run the script\n        run: |\n          yarn run start\n```\n\n## Inputs\n\n|                                                         `PERSPECTIVE_API_TOKEN`                                                              |\n|:--------------------------------------------------------------------------------------------------------------------------------------------:|\n| **Required** — This Action use the **Perspective API**. — [Get your key here ➡](https://developers.perspectiveapi.com/s/docs-enable-the-api) |\n\n\n## How it works \n\nWhen anyone creates a new comment in a discussion or creates a new discussion, the script will check if the comment is toxic. \nIf the author edits their comment, the Action will run again.\n\nOutput workflow : \n\n![Output workflow](https://user-images.githubusercontent.com/14293805/145136473-3fa03470-1856-404c-8b09-639e2d193b8a.png)\n\n## Test locally \n\nYou can test the [test/SampleRequestPerspectiveAPI.js](test/SampleRequestPerspectiveAPI.js) file.\n\n1. Clone this project \n2. Create a .env file and put your GOOGLE_API_TOKEN\n3. Write a bad comment at CONTENT (line 6)\n4. Run with `yarn run test` or `npm run test` !\n\n## Contribute \n\n**Anyone can contribute** to this GitHub Action. **Feel free** to discuss it [in the section provided for this purpose](/discussions). 👋🏼\nRead the [contribution Guidelines](/contributing.md) first. You can also contribute by sharing this repository. 😄 \n\n## Languages Supported\n\nThis Action is **only for the english language** for the moment. Maybe updates in the future will add others languages. \nWe are based on **Perspective API** with only _TOXICITY_ attribute name to detect bad comments, [see the available languages on the official website](https://developers.perspectiveapi.com/s/about-the-api-attributes-and-languages)   \n\n## Additional informations\n\n- 📣 News : Follow me on [Twitter](https://twitter.com/Thomasbnt_)\n- 🔗 See my [website](https://thomasbnt.dev) !\n- 📨  [Send me a email !](https://thomasbnt.dev/contact)\n\n## Donate \nFeel free to help [me](https://github.com/@thomasbnt) for the maintenance of this project !\n\n[![GitHub Sponsors](https://img.shields.io/badge/Sponsor%20me-%23EA54AE.svg?\u0026style=for-the-badge\u0026logo=github-sponsors\u0026logoColor=white)](https://github.com/sponsors/thomasbnt)\n[![Support me on Buy Me a Coffee](https://img.shields.io/badge/-Support%20me-%23FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black)](https://www.buymeacoffee.com/thomasbnt/?via=thomasbnt)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasbnt%2Fnotoxicdiscussions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasbnt%2Fnotoxicdiscussions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasbnt%2Fnotoxicdiscussions/lists"}