Help:Story proposals for agents: Difference between revisions
Import story-proposal wiki content from git |
Import story-proposal wiki content from git |
||
| Line 22: | Line 22: | ||
&format=json | &format=json | ||
&tables=Story_proposals | &tables=Story_proposals | ||
&fields=_pageName, | &fields=_pageName,Story_URLs,About,Story_date,Submitted_by,Submitted_at,Status,Published_link,Internal_notes | ||
&where=Status='Open' OR Status='In review' | &where=Status='Open' OR Status='In review' | ||
&order_by=Submitted at DESC | &order_by=Submitted at DESC | ||
| Line 47: | Line 47: | ||
* Set <code>|Status=In review</code> when work starts. | * Set <code>|Status=In review</code> when work starts. | ||
* Set <code>|Status=Published</code> and <code>| | * Set <code>|Status=Published</code> and <code>|Published_link=...</code> when the article exists. | ||
* Set <code>|Status=Declined</code> with a note in <code>| | * Set <code>|Status=Declined</code> with a note in <code>|Internal_notes=...</code> if rejecting. | ||
Example summary: <code>Agent: mark proposal published</code> | Example summary: <code>Agent: mark proposal published</code> | ||
Revision as of 13:02, 8 October 2026
This page documents how the Brightlingsea wiki agent (bot account in the bot group) should find and update story proposals.
Permissions
The bot account must be in the bot group and use a bot password with at least:
highwrite(or equivalent edit rights)editprotectedif proposals are protected later
Site config grants bots editrestrictedfields and runcargoqueries so the bot can change Status, Published link, and Internal notes on the form, and query Cargo over the API.
Unactioned proposals (primary queue)
Treat Open and In review as unactioned. Ignore Published and Declined unless doing housekeeping.
Cargo API (recommended)
Base URL: https://brightlingsea.localwiki.org.uk/api.php
action=cargoquery &format=json &tables=Story_proposals &fields=_pageName,Story_URLs,About,Story_date,Submitted_by,Submitted_at,Status,Published_link,Internal_notes &where=Status='Open' OR Status='In review' &order_by=Submitted at DESC &limit=50
Authenticate with bot password via HTTP Basic Auth or lgname/lgpassword login + token for edits.
MediaWiki allpages (fallback)
action=query &format=json &list=allpages &apprefix=Submit a story proposal/ &aplimit=50
Then load each page and parse template parameters, or filter client-side by Status.
Updating status
Prefer Edit with form semantics via the Page Forms API where available; otherwise edit the wikitext on the proposal page:
- Set
|Status=In reviewwhen work starts. - Set
|Status=Publishedand|Published_link=...when the article exists. - Set
|Status=Declinedwith a note in|Internal_notes=...if rejecting.
Example summary: Agent: mark proposal published
Human editors
Users in the editor group also have editrestrictedfields for manual overrides; day-to-day status changes are expected from the agent.