webhook payload should include the host URL

This commit is contained in:
Brad Rydzewski 2015-01-13 21:57:30 -08:00
parent d0b722cc8b
commit ff127f0349

View file

@ -29,10 +29,11 @@ func (w *Webhook) Send(context *model.Request) error {
func (w *Webhook) send(context *model.Request) error {
// data will get posted in this format
data := struct {
From string `json:"from_url"`
Owner *model.User `json:"owner"`
Repo *model.Repo `json:"repository"`
Commit *model.Commit `json:"commit"`
}{context.User, context.Repo, context.Commit}
}{context.Host, context.User, context.Repo, context.Commit}
// data json encoded
payload, err := json.Marshal(data)