User:AnomieBOT/source/tasks/DatedCategoryDeleterTest.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: General: * Update for the addition of 'rvslots'. DatedCategoryDeleterTest: * Disable. It's clear that task won't be needed. BrokenRedirectDeleter: * Handle pages with newlines before the <code>#REDIRECT</code>.
AnomieBOT (talk | contribs)
Updating published sources: DatedCategoryCreator: * Pointless template rename. DatedCategoryDeleterTest: * Apparently the test was screwed up by a similar category rename. Sigh. Re-enable the test.
Line 10:
Task: DatedCategoryDeleterTest
BRFA: N/A
Status: OnIn holdtrial
Created: 2017-01-31
Exclusion: false
Line 17:
categories would be useful. It will log to a subpage and we'll see how often it
actually finds anything.
 
(It turns out it's not needed, at least as of 2018-08-12)
 
=end metadata
Line 52 ⟶ 50:
 
sub approved {
return 0500;
}
 
Line 74 ⟶ 72:
SELECT page_namespace, page_title
FROM page JOIN categorylinks AS c1 ON(c1.cl_from=page_id) JOIN categorylinks AS c2 ON(c2.cl_from=page_id)
WHERE c1.cl_to = 'Candidates_for_uncontroversial_speedy_deletion' AND c2.cl_to = 'Monthly_clean_up_category_counterMonthly_clean-up_category_counter'
}, { Slice => {} } ) };
};
Line 121 ⟶ 119:
 
my $txt = $tok->{'revisions'}[0]{'slots'}{'main'}{'*'} // '';
unless ( $txt =~ /\s*\{\{Monthly clean[ -]up category(?:\s*\|[^\}]*)?\}\}\s*$/ ) {
$api->log( "Skipping [[Category:$title]], content isn't as expected" );
next;