Wikipedia:Bots/Requests for approval/Legobot 18


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved

Legobot 18
Operator:

Time filed: 07:18, Tuesday August 14, 2012 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python using Pywikipedia rewrite branch

Source code available:

Function overview: Adds |oldid= to GA when missing

Links to relevant discussions (where appropriate): bot request

Edit period(s): Daily

Estimated number of pages affected: 20/week?

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details:
 * Fetches Category:Good articles without an oldid
 * Iterates through the version history and finds which edit added good article.
 * Updates the talk page accordingly.

Discussion
An example edit (which I meant to make under my account). LegoKontribsTalkM 07:18, 14 August 2012 (UTC)

A few code comments, since you posted a link and I'm procrastinating : This seems wrong. Taking a quick look in pywikipedia, it doesn't seem that page.fullVersionHistory even takes a "total" parameter (it seems to have "revCount" instead). And if it did this would probably fetch history entries 1–10, then 1–20, then 1–30, and so on rather than 1–10, 11–20, 21–30, and so on. Note this will match all templates in Special:PrefixIndex/Template:GA, not just, and has various other issues that are less likely to be troublesome for this particular template. Anomie⚔ 16:20, 14 August 2012 (UTC)
 * I probably should have specified up there, but I'm using a custom flavor of the pywikipedia rewrite branch, not the standard release. But the  part was wrong. I modified fullVersionHistory so I can specify the oldid to start fetching from. I also changed the regex to   so it should only match . Thanks, LegoKontribsTalkM 23:10, 14 August 2012 (UTC)
 * LegoKontribsTalkM 05:20, 23 August 2012 (UTC)
 * – Go ahead and clear out the category. &mdash; madman 04:19, 25 August 2012 (UTC)
 * Edits are in the latest contributions, all of the oldids the bot found were correct when I reviewed them. LegoKontribsTalkM 04:42, 25 August 2012 (UTC)
 * &mdash; madman 05:16, 25 August 2012 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.