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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: PeerReviewTranscluder: * New task!
 
AnomieBOT (talk | contribs)
Updating published sources: PeerReviewTranscluder: * Approved!
 
(One intermediate revision by the same user not shown)
Line 1:
{{ombox|type=notice|text= ApprovalBRFA requestedapproved 2025-02-02<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 83]]}}
<syntaxhighlight lang="perl">
package tasks::PeerReviewTranscluder;
Line 10:
Task: PeerReviewTranscluder
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 83
Status: BRFAApproved 2025-02-02
Created: 2025-01-24
 
Line 39:
 
=for info
ApprovalBRFA requestedapproved 2025-02-02<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 83]]
 
=cut
 
sub approved {
return 03;
}
 
Line 50:
my ( $self, $api ) = @_;
 
my $screwup = ' ([[Wikipedia:Bots/Requests for approval/AnomieBOT 83|BRFA]]) Errors? [[User:' . $api->user . '/shutoff/PeerReviewTranscluder]]';
 
$api->task( 'PeerReviewTranscluder', 0, 10, qw(d::Templates d::Timestamp d::Redirects) );
Line 124:
$txt .= "== Peer review ==\n{{$pr}}\n<!-- Please comment in the transcluded page, thanks! [[User:" . $api->user . "]] " . strftime( "%H:%M, %-d %B %Y", gmtime ) . " (UTC) -->\n";
 
$res = $api->edit( $tok, $txt, "Transclude peer review [[$pr]]. $screwup", 0, 0 );
if ( $res->{'code'} ne 'success' ) {
$api->warn( "Write for $talk2 failed: " . $res->{'error'} . "\n" );