@@ -243,36 +243,72 @@ export class IssueHandler {
243243
244244 // Filter spam from b/378634578. This can be removed in the future.
245245 const spamWords = [
246- 'pemain' ,
247- 'wallet wallet' , // seems to be in most crypto issues
248- 'minecraft' ,
249- 'paybis' ,
250- 'blockchain' ,
251- 'official contact number' ,
252- 'phantom wallet' ,
253- 'defi wallet' ,
254- 'dogecoin' ,
255- 'crypto.com' ,
256- 'moonpay' ,
257- 'coinmama' ,
258- 'daftar' ,
259- [ 'wallet' , 'support' ] ,
246+ "pemain" ,
247+ "wallet wallet" , // seems to be in most crypto issues
248+ "minecraft" ,
249+ "paybis" ,
250+ "blockchain" ,
251+ "official contact number" ,
252+ "phantom wallet" ,
253+ "defi wallet" ,
254+ "dogecoin" ,
255+ "crypto.com" ,
256+ "moonpay" ,
257+ "coinmama" ,
258+ "daftar" ,
259+ "activation key" ,
260+ "cracked version" ,
261+ "download now" ,
262+ "xnxx" ,
263+ "sex@videos" ,
264+ "freeplayer.one" ,
265+ "movies7to.lol" ,
266+ "inatogel" ,
267+ 'rel="nofollow"' ,
268+ "ao vivo" ,
269+ "click here to watch" ,
270+ "diretta streaming" ,
271+ "rijeka" ,
272+ "social media x" ,
273+ "live streams free" ,
274+ [ "situs" , "slot" ] ,
275+ [ "premier league" , "live" ] ,
276+ [ "live streams" , "rugby" ] ,
277+ [ "pro league" , "tv" ] ,
278+ [ "diretta" , "le" ] ,
279+ [ "en direct" , "tv" ] ,
280+ [ "direct streaming" , "match" , "tv" ] ,
281+ [ "jogos" , "direto" ] ,
282+ [ "jogos" , "directo" ] ,
283+ [ "video viral" , "x twitter" ] ,
284+ [ "video" , "viral" , "trending now" ] ,
285+ [ "autodesk" , "login" ] ,
286+ [ "films" , "hd" , "4k" ] ,
287+ [ "free streaming" , "tv shows" ] ,
288+ [ "nfl" , "live streams" ] ,
289+ [ "free games" , "unblocked" ] ,
290+ [ "wallet" , "support" ] ,
291+ [ "download" , "crack" ] ,
292+ [ "download" , "serial key" ] ,
293+ [ "sex" , "videos" ]
260294 ] ;
261- const issueContent = ` ${ issue . title } ${ issue . body || '' } ` . toLowerCase ( ) ;
295+ const issueContent = ` ${ issue . title } ${ issue . body || "" } ` . toLowerCase ( ) ;
262296 // Scope spam filtering to affected repos only.
263- const isAffectedRepo = org == "firebase" && (
264- name == "flutterfire" ||
265- name == "quickstart-android" ||
266- name == "quickstart-ios"
267- ) ;
268- const isSpam = isAffectedRepo && spamWords . find ( ( wordOrArray ) => {
269- if ( Array . isArray ( wordOrArray ) ) {
270- return wordOrArray . every ( ( word ) => issueContent . includes ( word ) ) ;
271- } else {
272- const wordWithSpace = ` ${ wordOrArray } ` ;
273- return issueContent . includes ( wordWithSpace ) ;
274- }
275- } ) ;
297+ const isAffectedRepo =
298+ org == "firebase" &&
299+ ( name == "flutterfire" ||
300+ name == "quickstart-android" ||
301+ name == "quickstart-ios" ) ;
302+ const isSpam =
303+ isAffectedRepo &&
304+ spamWords . find ( wordOrArray => {
305+ if ( Array . isArray ( wordOrArray ) ) {
306+ return wordOrArray . every ( word => issueContent . includes ( word ) ) ;
307+ } else {
308+ const wordWithSpace = ` ${ wordOrArray } ` ;
309+ return issueContent . includes ( wordWithSpace ) ;
310+ }
311+ } ) ;
276312
277313 if ( isSpam ) {
278314 // Discard other actions, wipe and lock the issue, and block
0 commit comments