mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-11 10:05:27 +00:00
webhook payload should include the host URL
This commit is contained in:
parent
d0b722cc8b
commit
ff127f0349
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue