From c104fb2f24f1522acd2457ab6122d3318cd7ad82 Mon Sep 17 00:00:00 2001 From: Mitchell5200 Date: Thu, 29 Aug 2024 21:21:37 +0800 Subject: [PATCH] Update pottymouth.yml --- .github/workflows/pottymouth.yml | 38 ++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pottymouth.yml b/.github/workflows/pottymouth.yml index 992398d0..6dd93ee6 100644 --- a/.github/workflows/pottymouth.yml +++ b/.github/workflows/pottymouth.yml @@ -1,2 +1,36 @@ - name: Potty mouth - uses: IEvangelist/profanity-filter@1.0.74 \ No newline at end of file +# The name of the workflow +name: Profanity filter + +# Trigger on issue or pull requests, that are opened, edited, or reopened +on: + issue_comment: + types: [created, edited] + issues: + types: [opened, edited, reopened] + pull_request: + types: [opened, edited, reopened] + +# Required permissions +permissions: + issues: write + pull-requests: write + +jobs: + # Name the job whatever you'd like + apply-filter: + + runs-on: ubuntu-latest + + steps: + + # Name the step anything that makes sense to you + - name: Scan issue or pull request for profanity + # Conditionally run the step if the actor isn't a bot + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' }} + uses: IEvangelist/profanity-filter@main + id: profanity-filter + with: + token: ${{ secrets.GITHUB_TOKEN }} + # See https://bit.ly/potty-mouth-replacement-strategies + replacement-strategy: asterisk + manual-profane-words: /https?:\/\/(www\.)?(box|dropbox|mediafire|sugarsync|tresorit|hightail|opentext|sharefile|citrixsharefile|icloud|onedrive|1drv)\.com\/[^\s\)]+/g, /https?:\/\/(www\.)?(bit\.ly|t\.co|tinyurl\.com|goo\.gl|ow\.ly|buff\.ly|is\.gd|soo\.gd|t2mio|bl\.ink|clck\.ru|shorte\.st|cutt\.ly|v\.gd|qr\.ae|rb\.gy|rebrand\.ly|tr\.im|shorturl\.at|lnkd\.in)\/[^\s\)]+/g,