DEV Community

loading...
Cover image for Github Action "mind-your-language" used to maintain piety

Github Action "mind-your-language" used to maintain piety

vsasvipul0605 profile image Vipul Sinha ・1 min read

My Workflow

This GitHub Action "mind-your-language" is used to automate the developers work to:

  • avoid abusive languages in comment section for Github issues or pull requests.

  • Whenever a comment to an issue or pull request is created, the work flow will perform profanity check against the comment text and take reaction if offensive language is found.

Submission Category:

Maintainer Must-Haves

Yaml File or Link to Code

name: Mind your language
on:
  issues:
    types:
      - opened
      - edited
  issue_comment:
    types:
      - created
      - edited
  pull_request_review_comment:
    types:
      - created
      - edited
jobs:
  echo_issue_comment:
    runs-on: ubuntu-latest
    name: profanity check
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Profanity check step
        uses: tailaiw/mind-your-language-action@v1.0.3
        env:
          GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

This project is made for GitHub Actions x DEV Hackathon!

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build…

Additional Resources / Info

GitHub logo tailaiw / mind-your-language-action

A GitHub action that monitors PR/issue comments and warns senders who used offensive language.

Mind your language action

This action monitor comments to issues and pull requests, and remind the sender if offensive language is found.

Example usage

Create the following workflow file mind-your-language.yml in the .github/workflows/ directory of your repository:

name: Mind your language
on
  issues
    types
      - opened
      - edited
  issue_comment:
    types:
      - created
      - edited
  pull_request_review_comment:
    types:
      - created
      - edited
jobs:
  echo_issue_comment:
    runs-on: ubuntu-latest
    name: profanity check
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Profanity check step
        uses: tailaiw/mind-your-language-action@v1.0.3
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

Workflow

Whenever a comment to an issue or pull request is created, the work flow will perform profanity check against the comment text and take reaction if offensive language is found.

Profanity Check

I am currently using profanity-check, a Python package of profanity detection based…

Discussion (0)

pic
Editor guide