diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-08 08:18:03 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-08 08:18:03 -0400 |
commit | 23a857d107b06b5639b337aba2e335d3d66ef9db (patch) | |
tree | 483f46f826bef1c16b3ee0394e54b56c4f6cdba6 /modules/hooks | |
parent | 495d939ca580825c4a91612e38107ecc4339598a (diff) | |
download | gitea-23a857d107b06b5639b337aba2e335d3d66ef9db.tar.gz gitea-23a857d107b06b5639b337aba2e335d3d66ef9db.zip |
Add repo info to web hook post
Diffstat (limited to 'modules/hooks')
-rw-r--r-- | modules/hooks/hooks.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/hooks/hooks.go b/modules/hooks/hooks.go index a3a59454e2..6ae4418b35 100644 --- a/modules/hooks/hooks.go +++ b/modules/hooks/hooks.go @@ -30,11 +30,23 @@ type PayloadCommit struct { Author *PayloadAuthor `json:"author"` } +type PayloadRepo struct { + Id int64 `json:"id"` + Name string `json:"name"` + Url string `json:"url"` + Description string `json:"description"` + Website string `json:"website"` + Watchers int `json:"watchers"` + Owner *PayloadAuthor `json:"author"` + Private bool `json:"private"` +} + // Payload represents payload information of hook. type Payload struct { Secret string `json:"secret"` Ref string `json:"ref"` Commits []*PayloadCommit `json:"commits"` + Repo *PayloadRepo `json:"repository"` Pusher *PayloadAuthor `json:"pusher"` } |