mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 18:31:00 +00:00
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:
parent
dbdad86d90
commit
f98ac21010
1 changed files with 2 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue