One of the most important tasks for many bots is creating new topics on talk pages. As talk pages are converted to Flow, bots must be able to create topics on Flow boards. This task will add a Site method to utilize the 'new-topic' API submodule, add user-facing code to Board, and create tests to ensure proper operation.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Create new topics on a Flow board | pywikibot/core | master | +81 -1 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T107093 Bots and Flow living in harmony (tracking) | |||
Invalid | None | T110042 Pywikibot and Flow (tracking) | |||
Resolved | happy5214 | T67119 Implement Flow support in Pywikibot | |||
Resolved | happy5214 | T101258 Implement Flow support in Pywikibot (Phase 1: Reading and Posting) | |||
Resolved | happy5214 | T105129 Create new topics on a Flow board |
Event Timeline
Comment Actions
Change 223525 had a related patch set uploaded (by Happy5214):
[WIP] Create new topics on a Flow board
Comment Actions
Ideally new Topic and Post objects can be instantiated as 'not saved' , and then saved using a .save() override where appropriate.
i.e. something like:
board = Board(site, board_uuid) topic = Topic(site) topic.board = board topic_root = Post(topic, uuid=None) topic_root.title = 'subject' topic_root.text = 'body' topic.root = topic_root # note at this stage no write should have occurred topic.save()
(T105439 would be similar)
This is hard to do right, and needs lots of unit tests to prevent regressions. As such it is not necessary for the initial Flow support, much like it wasn't included in the initial Wikibase support.
Comment Actions
I'd prefer we create a new task for that so we can close this one once the current patch is merged. As you said, it's not needed right now.