dolibarr/.github
MDW 29b60cd552
Fix: Update comment moderation logic (#38451)
# Fix: Update comment moderation logic

Inspired by #38450 to help fix/complete the moderation script,
this updates the moderation script to:

- Add language detection for non-English comments
- Implement profanity filtering
- Check for off-topic content
- Improve forbidden link detection
- Add owner exemption logic
- Enhance error handling and logging
- Add a message indicating why the comment was deleted.

*To configure the moderation lists:*

- Go to repository Settings > Secrets > Actions
- Add `MODERATION_PROFANITY` secret containing a JSON array of terms
- Add `MODERATION_OFFTOPIC` secret containing a JSON array of phrases
- Example format for each: `["term1","term2","term3"]`

Resources for priming the PROFANITY and OFFTOPIC lists:
- https://www.cs.cmu.edu/~biglou/resources/ (first link)
- https://github.com/OOPSpam/spam-words/blob/main/spam-words-EN.txt

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-06-10 21:15:32 +02:00
..
ISSUE_TEMPLATE Removed field that are never filled 2024-03-02 16:56:04 +01:00
scripts Qual: Upgrade php version to run phan, add ast (#38143) 2026-05-10 03:22:08 +02:00
tmp Try to move tmp dir 2024-01-10 14:52:12 +01:00
workflows Fix: Update comment moderation logic (#38451) 2026-06-10 21:15:32 +02:00
CODE_OF_CONDUCT.md Doc 2026-05-11 20:54:03 +02:00
CODEOWNERS
CONTRIBUTING.md Update Transifex link in CONTRIBUTING.md (#38109) 2026-05-06 22:32:21 +02:00
dependabot.yml Doc 2025-08-27 01:08:10 +02:00
FUNDING.yml Qual: Fix line endings of yaml files for yamllint. (#27479) 2024-01-13 15:49:17 +01:00
PULL_REQUEST_TEMPLATE.md QUAL: github pull request template: add warning about target branch in case of bugfix (#34427) 2025-06-13 12:01:55 +02:00