Skip to content

Commit

Permalink
add keywords to ignore in edit summaries
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed Apr 1, 2024
1 parent 771542d commit eb00e25
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions UserTalkErasedSectionsDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,19 @@ class ErasedSectionsDetector {
}

filterOutArchiving() {
this.revisions = this.revisions.filter( ( revision ) => !revision.comment.includes( 'OneClickArchiver' ) );
this.revisions = this.revisions.filter( ( revision ) => !revision.comment.toLowerCase().includes( 'archiv' ) ); // archiving, archive
const keywordsToIgnore = [
'arch', // arch, archive, archiving, OneClickArchiver
'bot mes', // mesg, message
'mass mes',
'newsletter'
];
for ( let keyword of keywordsToIgnore ) {
this.revisions = this.revisions.filter( function ( revision ) {
keyword = keyword.toLowerCase();
const editSummary = revision.comment.toLowerCase();
return !editSummary.includes( keyword );
} );
}
}

/**
Expand Down

0 comments on commit eb00e25

Please sign in to comment.