Merge pull request #1186 from hkjn/fix-gogs-deps

Fix build errors due to changes in github.com/gogits/go-gogs-client
This commit is contained in:
Brad Rydzewski 2015-09-03 08:39:17 -07:00
commit 0860d36466

View file

@ -164,7 +164,7 @@ func (r *Gogs) Deactivate(user *model.User, repo *model.Repo, link string) error
func (r *Gogs) ParseHook(req *http.Request) (*model.Hook, error) {
defer req.Body.Close()
var payloadbytes, _ = ioutil.ReadAll(req.Body)
var payload, err = gogs.ParseHook(payloadbytes)
var payload, err = gogs.ParsePushHook(payloadbytes)
if err != nil {
return nil, err
}
@ -181,7 +181,7 @@ func (r *Gogs) ParseHook(req *http.Request) (*model.Hook, error) {
return &model.Hook{
Owner: payload.Repo.Owner.UserName,
Repo: payload.Repo.Name,
Sha: payload.Commits[0].Id,
Sha: payload.Commits[0].ID,
Branch: payload.Branch(),
Author: payload.Commits[0].Author.UserName,
Timestamp: time.Now().UTC().String(),