I only interact with ikiwiki via cli & git; thus I would love to be able to moderate comments via git from all remote checkouts without being forced to ssh to my server and do that locally.

Is anyone aware of a way to check all comments into a special branch, possibly called "moderation", and with a normal suffix, not "_comment_pending"? That would allow me to cherry-pick from that branch without having to remember to rename and simply delete all spam etc from the branch.

Every now and then, I could delete the whole branch, thus cleaning out crud. As the approved comments live in master, that would not be a problem.


A branch makes sense if it's used in a way that never ties its history with mainline, so all the spam can eventually be dropped out of git, by deleting the branch. Though this is clearly an expert user level option.

Probably the easiest way to get there would be to keep the branch, checked out, in .ikiwiki/comments_pending/. The old code that used that directory is still in ikiwiki for backwards compatability, so it should be easy to get comments written into that location. Then a minimum of vcs-specific code would be needed to set up the branch and commit pending comments to it.

But there's a wrinkle -- if you just cherry pick from that branch, the comments_pending directory will retain all the old spam, growing without bounds. And the web moderation interface will show them all. I suppose you could check out the branch and revert or delete spammy comments too, but this is feeling like a lot of work the user needs to do in order to use git to moderate spammy comments. I have to think most users would prefer, as I do, to occasionally flailing at a web form in this case.

Comment by joey Thu Mar 22 12:56:39 2012