pedroborges / kirby-autogit

⬢ Saves every change made via Kirby Panel to a Git repository
149 stars 23 forks source link

Pull Request workflow for webhooks #25

Closed fitzage closed 7 years ago

fitzage commented 7 years ago

As I'm looking at the plugin, it looks like it's designed to use a webhook to pull from the github repo when something is pushed to the repo. Here's what my workflow looks like, and I'm trying to figure out if it's possible with your plugin, or if I need to do something else.

  1. Changes are made either via control panel on a publish server (which has a separate branch from the master branch that's deployed to production), or via feature branches by developers.
  2. Those branches are pushed to github, and pull requests against master are created.
  3. When a pull request is merged, then we currently manually deploy master to six production servers.

So, I need to have it repsond to a pull request being merged to pull from master. The issue with this is github apparently only has a webhook that triggers when anything is done to a pull request, not just merging.

Now I guess really this isn't a big deal. If I set up the github webhook to trigger on pull requests, this would basically just trigger a pull when pull requests are created not just when they're closed, which really shouldn't create a problem, should it? Basically it would ping the webhook, and your plugin would trigger a pull which may or may not actually have anything available?

Am I reading this right as to how it would work?

fitzage commented 7 years ago

I just tested, and I THINK I answered my own question, as it all appears to work.