lvoytek / discourse-triage

Application to keep track of updates on a Discourse server
GNU General Public License v3.0
3 stars 3 forks source link

Get Revision History for a Post #18

Open ColmBhandal opened 1 year ago

ColmBhandal commented 1 year ago

Use Case

Allow a user to view some revision x of some post in a topic. For example, they might run:

dsctriage --get-revision <TOPIC_ID> <POST_NUM> <REVISION_NUM>

And then the markdown version of that post for that revision number is returned by the command.

Note: POST_NUM is assumed to be 0, 1, 3, ..., with 0 being the first post in a topic and so on. So if POST_NUM is omitted, a sensible default would be 0, because that's the first post in the topic, and that's the one we use to represent our documents at Canonical.

Bonus: get the current revision number for some post.

Motivation

Today in Discourse, if you want to review the revision history of a post, you have to manually cycle back through all the individual versions of the post. For posts like the Kubeflow Tutorial with over 100 revisions, this is infeasible if we want to jump back many versions.