From 9cf52efdffdc49acbf6d978191c202f712c7bf28 Mon Sep 17 00:00:00 2001 From: lstahlman Date: Tue, 9 Aug 2016 16:24:17 -0700 Subject: [PATCH] Add committer information to webhook payload. (#40) --- repo_hook.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/repo_hook.go b/repo_hook.go index 47fa13e..ec5c385 100644 --- a/repo_hook.go +++ b/repo_hook.go @@ -80,6 +80,12 @@ type PayloadAuthor struct { UserName string `json:"username"` } +type PayloadCommitter struct { + Name string `json:"name"` + Email string `json:"email"` + UserName string `json:"username"` +} + type PayloadUser struct { UserName string `json:"login"` ID int64 `json:"id"` @@ -87,10 +93,11 @@ type PayloadUser struct { } type PayloadCommit struct { - ID string `json:"id"` - Message string `json:"message"` - URL string `json:"url"` - Author *PayloadAuthor `json:"author"` + ID string `json:"id"` + Message string `json:"message"` + URL string `json:"url"` + Author *PayloadAuthor `json:"author"` + Committer *PayloadCommitter `json:"committer"` } type PayloadRepo struct {