woolfg / dokuwiki-plugin-gitbacked

Plugin for DokuWiki to store/sync files and media with a git repo
GNU General Public License v2.0
74 stars 26 forks source link

Pull repository on webhook notification #49

Open jdorel opened 5 years ago

jdorel commented 5 years ago

Would it be possible to use a webhook notification to do a pull request ? This would make sure any modification made through a git push make it faster to the wiki.

This could also be used prior to a wiki edit, to make sure no modification were made on this file.

woolfg commented 5 years ago

hey, thanks for the proposal. I am not sure if I understand your use case, could you describe in more detail how you envision the workflow please.

cheers

jdorel commented 5 years ago

Here would be the workflow:

  1. A user edit the git repo
  2. The git repo (for example github.com) notify dokuwiki through a webhook
  3. Dokuwiki pull the latest version of the repo

This is an alternative method to the periodic polling, that would reduce the probability of a user modifying a page on the wiki that had been modified on the git repo.

woolfg commented 5 years ago

OK, got it. I think it would be a nice feature. I think it is not a huge deal, just an external endpoint that can be called and calls the pull routine. Are you able to code that in a PR?

jdorel commented 5 years ago

I don't have the time right now (and as it stand I also don't know PHP yet)

woolfg commented 5 years ago

ok, maybe I'll find the time to quickly implement it or also from my side a +1 if somebody else wants to implement it.

iainhallam commented 1 year ago

This looks like a duplicate of #42