This workflow blocks the submission of a description or comment if it contains a word from the blacklist.
|Previous Title||Spam Blacklist|
Block descriptions and comments that contain stop words (on-change rule)
profanity-common.js (custom script)
This workflow prevents users from submitting issues or comments that contain offensive language. You can edit the rule to add words to or remove words from the blacklist.
This workflow contains two modules. The first is an on-change rule that checks the description and comment to see if it contains any word on the blacklist. The second module is a custom script.
Block descriptions and comments that contain stop words
When an issue is reported or updated, this rule checks the description and comment to see if it contains any word on the blacklist. If true, a warning is displayed. The user is informed that the description or comment contains one or more words from the blacklist.
This custom script contains all of the words in the stop list. This script is referenced in the on-change rule in the
const profanity = require('./profanity-common'); declaration.
If you find any profane words that are reported in your issues or any other words that you want to block, you can update the list of words in this module without modifying the workflow rule.