mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +00:00
Merge pull request #2315 from favadi/gitea-pull-sender
uses email from Sender field of push event
This commit is contained in:
commit
9a76ab5bbb
6 changed files with 6 additions and 2 deletions
|
@ -46,6 +46,7 @@ const HookPush = `
|
|||
"login": "gordon",
|
||||
"id": 1,
|
||||
"username": "gordon",
|
||||
"email": "gordon@golang.org",
|
||||
"avatar_url": "http://gitea.golang.org///1.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ func buildFromPush(hook *pushHook) *model.Build {
|
|||
Message: hook.Commits[0].Message,
|
||||
Avatar: avatar,
|
||||
Author: author,
|
||||
Email: hook.Pusher.Email,
|
||||
Email: hook.Sender.Email,
|
||||
Timestamp: time.Now().UTC().Unix(),
|
||||
Sender: sender,
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ type pushHook struct {
|
|||
ID int64 `json:"id"`
|
||||
Login string `json:"login"`
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
Avatar string `json:"avatar_url"`
|
||||
} `json:"sender"`
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ var HookPush = `
|
|||
"sender": {
|
||||
"login": "gordon",
|
||||
"id": 1,
|
||||
"email": "gordon@golang.org",
|
||||
"avatar_url": "http://gogs.golang.org///1.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ func buildFromPush(hook *pushHook) *model.Build {
|
|||
Message: hook.Commits[0].Message,
|
||||
Avatar: avatar,
|
||||
Author: author,
|
||||
Email: hook.Pusher.Email,
|
||||
Email: hook.Sender.Email,
|
||||
Timestamp: time.Now().UTC().Unix(),
|
||||
Sender: sender,
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ type pushHook struct {
|
|||
ID int64 `json:"id"`
|
||||
Login string `json:"login"`
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
Avatar string `json:"avatar_url"`
|
||||
} `json:"sender"`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue