Language Check

Niharika Singh ⛓ - Aug 16 '20 - - Dev Community

My Workflow

Language Check action automatically filters issues and pull requests that contains objectionable language (profane words) and instantly reports the action URL on your chosen Slack channel.

This workflow is a must-have for all the developers out there who contribute to open source projects and may get trashed for their hard work 🤦🏻‍♀️

Alt Text

Maintaining sanity in the open source community is essential AF. 😉

This workflow is triggered each time there is an issue is opened, or there is a new comment on an existing issue, or there is a pull request.

⚠️ To test this flow by yourself, you need to have a #blockchain channel in your workspace. Or, you can edit the yml file and change SLACK_CHANNEL there.

⚠️ You also need to generate SLACK_WEBHOOK token for your own Slack workspace and save it in GitHub secrets. To set it up, see this. The slack channel I am using: degen-gh-actions.slack.com. So, the token for this workspace would be different than yours.

Submission Category:

Maintainer Must-Haves

Yaml File

name: Language Check
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
        id: set_output
        uses: niharrs/mind-your-language-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: Slack Notification
        if: steps.set_output.outputs.result == 'bad'
        uses: rtCamp/action-slack-notify@master
        env:
          SLACK_CHANNEL: blockchain
          SLACK_USERNAME: moralPolice
          SLACK_COLOR: red
          SLACK_MESSAGE: ':warning: Profanity found on repository'
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

Link to Code

Hackathon Entry for GitHub Actions Hackathon on DEV

Submission Category: Maintainer Must-Have

Description of the workflow

Language Check action automatically filters issues and pull requests that contains objectionable language (profane words) and instantly reports the action URL on your chosen Slack channel.

This workflow is a must-have for all the developers out there who contribute to open source projects and may get trashed for their hard work 🤦🏻‍♀️

Alt Text

Maintaining sanity in the open source community is essential AF. 😉

This workflow is triggered each time there is an issue is opened, or there is a new comment on an existing issue, or there is a pull request.

This workflow makes use of two already existing GitHub actions:

  1. Mind your language action: I forked it and tweaked the entrypoint.sh to use conditional jobs and workflows offered by GitHub Actions API.
  2. Slack Notify - GitHub Action: This action is highly…

Additional Resources / Info

This workflow makes use of two already existing GitHub actions:

  1. Mind your language action: I forked it and tweaked the entrypoint.sh to use conditional jobs and workflows offered by GitHub Actions API.
  2. Slack Notify - GitHub Action: This action is highly customizable, you can send in parameters in the form of environment variables.

Feel free to reach out in case of any issue.

Cheers.✌️

. . . . . . . . . . . . . . . . .