mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-06-07 01:48:50 +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 {
|
func (w *Webhook) send(context *model.Request) error {
|
||||||
// data will get posted in this format
|
// data will get posted in this format
|
||||||
data := struct {
|
data := struct {
|
||||||
|
From string `json:"from_url"`
|
||||||
Owner *model.User `json:"owner"`
|
Owner *model.User `json:"owner"`
|
||||||
Repo *model.Repo `json:"repository"`
|
Repo *model.Repo `json:"repository"`
|
||||||
Commit *model.Commit `json:"commit"`
|
Commit *model.Commit `json:"commit"`
|
||||||
}{context.User, context.Repo, context.Commit}
|
}{context.Host, context.User, context.Repo, context.Commit}
|
||||||
|
|
||||||
// data json encoded
|
// data json encoded
|
||||||
payload, err := json.Marshal(data)
|
payload, err := json.Marshal(data)
|
||||||
|
|
Loading…
Reference in a new issue