From 1932f15239ce985b5d19935f3d906b8a940558b1 Mon Sep 17 00:00:00 2001 From: borislavr Date: Wed, 29 Jul 2026 09:09:29 +0000 Subject: [PATCH] chore(ci): update of profanity-filter.yaml workflow Bump profanity-filter version to support words exclusion. Fix for https://github.com/Netcracker/qubership-workflow-hub/issues/865 --- .github/workflows/profanity-filter.yaml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/profanity-filter.yaml b/.github/workflows/profanity-filter.yaml index b8ab7782..b8dedf69 100644 --- a/.github/workflows/profanity-filter.yaml +++ b/.github/workflows/profanity-filter.yaml @@ -14,14 +14,18 @@ permissions: pull-requests: write jobs: - call-apply-filter: - if: ${{ github.event_name == 'issue_comment' || github.event_name == 'issues' || (github.event_name == 'pull_request' && github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id) }} - uses: Netcracker/qubership-workflow-hub/.github/workflows/profanityFilter.yaml@main - warning: + apply-filter: + name: "Apply Profanity Filter" runs-on: ubuntu-latest - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id }} steps: - - name: "Warning" - run: | - echo "⚠️ Pull request from fork! ⚠️" >> $GITHUB_STEP_SUMMARY - echo "The action cannot be run over PRs from fork." >> $GITHUB_STEP_SUMMARY + - name: Scan issue or pull request for profanity + # Conditionally run the step if the actor isn't a bot + if: ${{ github.event.sender.type != 'Bot' }} + uses: IEvangelist/profanity-filter@96fb7c017b3219ea65c6a7ca70e5aed3ce5b4d7d # v13.4.6.2 + id: profanity-filter + with: + token: ${{ secrets.GITHUB_TOKEN }} + # See https://bit.ly/potty-mouth-replacement-strategies + replacement-strategy: middle-asterisk # See Replacement strategy + custom-profane-words-url: https://github.com/Hesham-Elbadawi/list-of-banned-words/raw/refs/heads/master/ru + exclude-profane-words: mongo,robot