Open ochurlaud opened 2 years ago
thank @ochurlaud for the proposal, can you please describe it a bit more in details what is does and for what use case it is needed?
The need: If i use gitbacked, it is because I want all the relevant information of my wiki to be stored in git. Whenever I validate a page (it's what the plugin is for: having draft pages, and promoting some pages as "validated").
What it would do: each time someone promotes a page as "validated", an empty commit on the associated page is added.
How to implement it ? Register to the "PLUGIN_PUBLISH_APPROVE" event, and whenever it received, commit the page (empty commit) with a given commit message (such as "Page approved by $user: $page_id").
When all that is done, my next step would be to create a script that recreates the dokuwiki history based on the git history. But that is for another issue :P
ok, I see. maybe we could build a more flexible system which can be used for other plugins as well. so that we e.g. can config it somewhere what events should lead to what commit message. what do you think @ochurlaud ?
very good idea. I'll propose something :)
Whenever a page is validated, add a specific empty commit to keep track of the validation.
I already have a patch to implement that. If you think it's a legitimate feature, please tell me and i'll propose it.