Fix build errors due to changes in github.com/gogits/go-gogs-client

Change ParseHook -> ParsePushHook
(https://github.com/gogits/go-gogs-client/blob/master/repo_hooks.go#L185),
PayloadCommit.Id->ID
(https://github.com/gogits/go-gogs-client/blob/master/repo_hooks.go#L88).

Tested: `make deps` works after this change

Fixes #1185
This commit is contained in:
Henrik Jonsson 2015-09-03 17:28:08 +02:00
parent dbdad86d90
commit f98ac21010

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(),