diff --git a/.github/global.yml b/.github/global.yml index 4a336c90..0ad22f85 100644 --- a/.github/global.yml +++ b/.github/global.yml @@ -41,6 +41,9 @@ - name: dependencies description: '[bot] PRs that update a dependency file' color: '#0366d6' + - name: profane content 🤬 + description: Either the title or body text contains profanity + color: FBCA04 # Planning - name: epic diff --git a/.github/sync/config.yml b/.github/sync/config.yml index 886cd256..926071ff 100644 --- a/.github/sync/config.yml +++ b/.github/sync/config.yml @@ -54,6 +54,9 @@ group: # issue sorting - source: HOW_WE_USE_GITHUB.md dest: HOW_WE_USE_GITHUB.md + # profanity filter + - source: .github/workflows/profanity-filter.yml + dest: .github/workflows/profanity-filter.yml # projects with releases - repos: | conda/conda diff --git a/.github/workflows/profanity-filter.yml b/.github/workflows/profanity-filter.yml new file mode 100644 index 00000000..9b225481 --- /dev/null +++ b/.github/workflows/profanity-filter.yml @@ -0,0 +1,27 @@ +--- +name: Profanity filter + +on: + issue_comment: + types: [created, edited] + issues: + types: [opened, edited, reopened] + pull_request: + types: [opened, edited, reopened] + +jobs: + apply-filter: + name: Apply profanity filter + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - name: Profanity filter + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' }} + uses: IEvangelist/profanity-filter@main + id: profanity-filter + with: + token: ${{ secrets.GITHUB_TOKEN }} + replacement-strategy: asterisk