From 94e7942eb1f362eff571ed382f0477a0184e4e3d Mon Sep 17 00:00:00 2001 From: Bianca Henderson Date: Thu, 29 Feb 2024 11:52:10 -0500 Subject: [PATCH 1/4] Create profanity filter workflow and accompanying label --- .github/global.yml | 3 +++ .github/workflows/profanity-filter.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/profanity-filter.yml diff --git a/.github/global.yml b/.github/global.yml index 4a336c90..89e20f83 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/workflows/profanity-filter.yml b/.github/workflows/profanity-filter.yml new file mode 100644 index 00000000..569490e6 --- /dev/null +++ b/.github/workflows/profanity-filter.yml @@ -0,0 +1,26 @@ +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 From ba860a14af247211955cdc198e4fb421e4fbdeef Mon Sep 17 00:00:00 2001 From: Bianca Henderson Date: Thu, 29 Feb 2024 11:55:54 -0500 Subject: [PATCH 2/4] Enable profanity filter workflow to get synced across the conda org --- .github/sync/config.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From 9425a247645553efdb09943d18d014d9411a18b2 Mon Sep 17 00:00:00 2001 From: Bianca Henderson Date: Thu, 29 Feb 2024 12:00:28 -0500 Subject: [PATCH 3/4] Correct YAML syntax --- .github/workflows/profanity-filter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/profanity-filter.yml b/.github/workflows/profanity-filter.yml index 569490e6..76454ddf 100644 --- a/.github/workflows/profanity-filter.yml +++ b/.github/workflows/profanity-filter.yml @@ -1,3 +1,4 @@ +--- name: Profanity filter on: From d579ee2dbe3c9cb378df5af26346448265c3d651 Mon Sep 17 00:00:00 2001 From: Bianca Henderson Date: Thu, 29 Feb 2024 17:42:10 -0500 Subject: [PATCH 4/4] Update yaml files to be properly formatted --- .github/global.yml | 4 ++-- .github/workflows/profanity-filter.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/global.yml b/.github/global.yml index 89e20f83..0ad22f85 100644 --- a/.github/global.yml +++ b/.github/global.yml @@ -42,8 +42,8 @@ description: '[bot] PRs that update a dependency file' color: '#0366d6' - name: profane content 🤬 - description: 'Either the title or body text contains profanity' - color: 'FBCA04' + description: Either the title or body text contains profanity + color: FBCA04 # Planning - name: epic diff --git a/.github/workflows/profanity-filter.yml b/.github/workflows/profanity-filter.yml index 76454ddf..9b225481 100644 --- a/.github/workflows/profanity-filter.yml +++ b/.github/workflows/profanity-filter.yml @@ -18,10 +18,10 @@ jobs: 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 + - 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