Added webhook functionality to the git middleware.

The webhook providers reside behind a small interface which determines if
a provider should run. If a provider should run it delegates
responsibility of the request to the provider.
ghdeploy initial commit

Added webhook functionality to the git middleware.
The webhook providers reside behind a small interface which determines if a provider should run. If a provider should run it delegates responsibility of the request to the provider.

Add tests

Remove old implementation

Fix inconsistency with git interval pulling.

Remove '\n' from logging statements and put the initial pull into a startup function
This commit is contained in:
xenolf
2015-06-03 01:29:33 +02:00
parent 4852f0580b
commit b4780a41d3
5 changed files with 303 additions and 6 deletions

View File

@ -59,6 +59,9 @@ type Repo struct {
lastPull time.Time // time of the last successful pull
lastCommit string // hash for the most recent commit
sync.Mutex
HookUrl string // url to listen on for webhooks
HookSecret string // secret to validate hooks
}
// Pull attempts a git clone.